If the DataSource contains more than one table, you must set the DataMember property to a string that represents the name of the table to bind to.
The following is a list of the supported data sources:
System.Data.DataTable | Represents one table of in-memory data. |
System.Data.DataView | Represents a databindable, customized view of a System.Data.DataTable for sorting, filtering, searching, editing, and navigation. |
System.Data.DataSet | Represents an in-memory cache of data. |
System.Data.DataViewManager | Contains a default System.Data.DataViewSettingCollection for each System.Data.DataTable in a System.Data.DataSet. |
Any component that implements the System.ComponentModel.IListSource interface. | Provides functionality to an object to return a list that can be bound to a data source. |
Any component that implements the System.Collections.IList interface. | Represents a collection of objects that can be individually accessed by index. |
Jagged arrays | A jagged array is an array whose elements are arrays. |
The next example demonstrates how to bind the grid to a jagged array:
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2