Skip to content

DevExpress-Examples/how-to-bind-a-worksheet-to-a-generic-list-or-a-bindinglist-data-source

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

How to: Bind a Worksheet to a Generic List or a BindingList Data Source

This example demonstrates the use of a List<T> and BindingList<T> objects as data sources to bind data to the worksheet range.

image

Implementation Details

Use the WorksheetDataBindingCollection.BindToDataSource method to bind data to the range, and the WorksheetDataBindingCollection.BindTableToDataSource method to bind data to the worksheet table.

The ExternalDataSourceOptions object specifies various data binding options. A custom converter with the IBindingRangeValueConverter interface converts weather data between the data source and a worksheet.

If the data source does not allow modification, the binding worksheet range also prevents modification.

Data binding error results in the WorksheetDataBinding.Error event and cancels data update. The event handler in this example displays a message containing the error type.

Files to Review

Documentation

Does this example address your development requirements/objectives?

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