qq1269832742 / how-to-bind-a-worksheet-to-a-generic-list-or-a-bindinglist-data-source-t480285

.NET, WinForms, XtraSpreadsheet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Files to look at:

How to bind a worksheet to a generic list or a BindingList data source

This example demonstrates the use of a List and BindingLIst 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.


About

.NET, WinForms, XtraSpreadsheet

License:Other


Languages

Language:C# 100.0%