Me.WebHierarchicalDataGrid1.GroupingSettings.EnableColumnGrouping = True Me.WebHierarchicalDataGrid1.GroupingSettings.GroupedColumns.Add("CategoryID")
Using the GroupBy feature in WebHierarchicalDataGrid™ allows you to present data to your end users in an organized fashion. You can group columns from code behind by adding columns to the GroupedColumns collection.
The following code shows you how to group by the CategoryName column.
In Visual Basic:
Me.WebHierarchicalDataGrid1.GroupingSettings.EnableColumnGrouping = True Me.WebHierarchicalDataGrid1.GroupingSettings.GroupedColumns.Add("CategoryID")
In C#:
this.WebHierarchicalDataGrid1.GroupingSettings.EnableColumnGrouping = true; this.WebHierarchicalDataGrid1.GroupingSettings.GroupedColumns.Add("CategoryID");
In Javascript:
var grid = $find("WebHierarchicalDataGrid1"); grid.get_groupingSettings().get_groupedColumns().add("CategoryID");