$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
GridView Grouping in ASP.NET AJAX
Home > How to > Grid Do Grouping
While using the Kettic ASP.NET Ajax Data Grid Control to group data, the grouping options are gathered in a special area, the GroupingGridPanel. When users perform the grouping grid data, the group fields will display in the group panel as elements according to the sort order, such as alphabetic, minimize, and maximize. The Kettic asp.net Gridview Control supports the feature of adding or rearranging the data grouping by dragging and dropping the header of the column to apply data grouping. Users of the asp.net Data Grid Control can find more details on end user data grid grouping behavior building.

Properties of Data Grid Grouping

The Kettic asp.net Data Grid View Control provides the following Grid View Template properties to control the grid grouping behavior.
  • EnableGrouping, this property is used to switch data grid grouping applying between C# code and drag and drop. The default value of this property is True.
  • AllowDragToGroup, this property is used to allow the end user to drag column headers and drop to the grouping panel. The default value of this property is True.
  • AutoExpandGroups, this property is used to expand groups automatically while adding any grouping expressions either in C# or by drag and drop. The default value of this property is False.

Data Grouping to GridView in C#

We need change the value of the EnableGrouping property of the desired template to True. And then, we can create and add new GroupingSettings to the collection to create grid data grouping to GridView. In the C# code below, we are going to use the GroupName property, which determine the grouping of grid data and the group names for one grouping criteria to grid data.

this.KaxGrid1.MasterTemplate.EnableGrouping = true;
GroupingSettings setting = new GroupingSettings();
setting .GroupNames.Add("ProductID", ListSortDirection.Descending);
this.KaxGrid1.GroupingSettings.Add(descriptor);
ASP.NET AJAX UI Controls