The following example demonstrates how to use a worksheet table as a data source to generate a report in a RichEditControl.
In this example, a worksheet containing a table with data is loaded in a Workbook instance. The Table.GetDataSource method returns a data source which is subsequently used to create a report in a RichEditControl.
To modify worksheet data before they are exposed as data source fields, the application utilizes a custom converter that implements the IBindingRangeValueConverter interface. The MyPictureProvider converter finds a picture in a worksheet by its name and returns a picture bitmap instead of a name specified in a worksheet column.
The custom MyColumnDetector object which implements the IDataSourceColumnTypeDetector interface is used to specify column names and types.
Note that a table required to visualize the data in the RichEditControl component is created in code at runtime.
- Form1.cs (VB: Form1.vb)
- MyColumnDetector.cs (VB: MyColumnDetector.vb)
- MyPictureProvider.cs (VB: MyPictureProvider.vb)
(you will be redirected to DevExpress.com to submit your response)