This example demonstrates the use of a List<T> and BindingList<T> objects as data sources to bind data to the worksheet range.
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.
- Form1.cs (VB: Form1.vb)
- MyConverter.cs (VB: MyConverter.vb)
- WeatherReport.cs (VB: WeatherReport.vb)
(you will be redirected to DevExpress.com to submit your response)