ComponentOne FlexGrid for WinForms
DataSource Property (C1FlexGridBase)

C1.Win.C1FlexGrid Namespace > C1FlexGridBase Class : DataSource Property
Gets or sets the data source for the grid.
Syntax
'Declaration
 
Public Property DataSource As Object
public object DataSource {get; set;}
Remarks

Any object that implements the System.Collections.IList or System.ComponentModel.IListSource interfaces can be used as a data source.

Specifically, the following ADO.NET data sources are valid: DataTable, DataView, DataSet, and DataViewManager.

The following ComponentOne DataObjects components are also valid data sources: C1ExpressTable, C1ExpressVew, C1ExpressConnection, C1DataView, C1DataTableSource, and C1DataSet.

If the DataSource reference contains more than one table, you must also set the DataMember property a string that specifies the table to bind to. For example, if the DataSource is a DataSet or DataViewManager that contains three tables named Customers, Orders, and OrderDetails, you must specify one of the tables to bind to.

You can use the SetDataBinding(Object,String) method to set the DataSource and DataMember properties simultaneously.

You can also assign another C1FlexGrid object to the DataSource property. In this case, the controls will share the same grid model, including the data, display styles, selection, etc. This can be used to implement split views, where different controls display different parts of the same data.

See Also

Reference

C1FlexGridBase Class
C1FlexGridBase Members