DataGrid for WPF and Silverlight Overview > DataGrid Features > Data Binding |
The C1DataGrid control can be bound to any object that implements the System.Collections.IEnumerable interface (such as XmlDataProvider, ObjectDataProvider, DataSet, DataView, and so on). You can use the C1DataGrid.ItemsSource property to bind the C1DataGrid.
To bind the grid, simply set the ItemsSource property to an IEnumerable implementation. Each row in the data grid will be bound to an object in the data source, and each column in the data grid will be bound to a property of the data object.
Note that in order for the C1DataGrid user interface to update automatically when items are added to or removed from the source data, the control must be bound to a collection that implements INotifyCollectionChanged, such as an ObservableCollection<(Of <(T>)>).
For steps on binding a C1DataGrid control to an XML data source, see the DataGrid for WPF Quick Start.