How to group the DataGridView by a column?
|
Article Information
|
Article relates to VIBlend DataGridView for WinForms
|
How To
|
Bind the data grid and group its data.
|
Solution
|
To achieve this, follow these steps:
|
1. Create a new instance of the vDataGridView via drag and drop from the toolbox or create it programmatically.
|
2. Drag and drop a new NorthWind data set. You can find the NWind.mdb in the VIBlend Controls for WinForms installation package.
|
3. Drag and drop Categories and Products table adapters.
|
4. Fill the Categories and Products tables.
|
|
5. Create the DataGrid’s BoundFields
|
|
6. Add the data grid’s grouping column and set the GroupingEnabled property to true.
|
|
7. Finally, bind the data grid to the data source.
|
|
|