Skip to content

Select a worksheet range and use it as a data source for Linear Gauge and Data Grid controls.

License

Notifications You must be signed in to change notification settings

DevExpress-Examples/winforms-spreadsheet-use-cell-range-as-data-source

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spreadsheet Control for WinForms - Use Cell Range as a Data Source

This example demonstrates how to select a worksheet range and use it as a data source for Linear Gauge and Data Grid controls.

Select the range containing data and click Provide Data to Gauge. The data source is created and passed to all data-aware controls. Switch to the Thermometer tab to see the linear gauge and a grid controls bound to the worksheet range.

image

Implementation Details

The Range.GetDataSource method call creates the data binding range. The RangeDataSourceOptions.UseFirstRowAsHeader option allows you to automatically name columns in the data source. The DataSourceColumnTypeDetector option is used to specify a custom object that provides column names and determines column types. The DataBindingCollection.Error event is handled to obtain additional information if any error occurs during data binding.

Files to Review

More Examples

Documentation

Does This Example Address Your Development Requirements/Objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Select a worksheet range and use it as a data source for Linear Gauge and Data Grid controls.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •