The following example demonstrates how to provide, through a style, a new ControlTemplate for DataRow objects. A new ControlTemplate has also been provided for the grid in order to change its ScrollViewer to a WrapPanel.
The columns that are contained in the grid will be limited to those specified in the ItemProperties of the DataGridCollectionViewSource.
This example assumes that the grid is bound to the Employees table of the Northwind database.
Gets or sets the converter to convert values to and from the corresponding field in the underlying data source. (Inherited from Xceed.Wpf.DataGrid.DataGridItemPropertyBase)
Gets or sets the IEqualityComparer that is used to compare the equality of the item property's distinct values. (Inherited from Xceed.Wpf.DataGrid.DataGridItemPropertyBase)
Gets or sets the custom data comparer that will be used to sort the values of the data-grid item property's associated column. (Inherited from Xceed.Wpf.DataGrid.DataGridItemPropertyBase)
Initializes a new instance of the DataGridItemProperty class specifying the name and title of the property, its value path, indicating whether it is read only, if the corresponding cell can be edited when a new item is being inserted, and if it represents a sub relationship.
Target Platforms: Windows 11, Windows 10, 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