WebGrid now supports column grouping along with WebValueList.
In this topic, you will learn how to enable column grouping with WebValueList.
To enable column grouping with WebValueList
- Bind Products, Supplies and Categories tables using ISDataSource.
- Right click on WebGrid and choose WebGrid.NET Designer.
- Click See all properties. Set GroupByBoxVisible to True.
- Switch to Advanced tab. Expand RootTable and select GroupColumns.
- Add a column. Set ColumnMember to SupplierID, GroupInterval to Text, SortOrder to Ascending.
- Go to Columns. Select SupplierID and go to Value List section.
- Set DataMember to Suppliers, Data Text Field to CompanyName and Data Value Field to SupplierID.
- Click See all properties. Set GroupInterval to Text and GroupRowInfoFormat to Supplier : [value].
- Run the project.