Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 3.44 KB

File metadata and controls

36 lines (24 loc) · 3.44 KB

Spreadsheet Document API: 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.

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)