$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
GridView Control for Windows Forms
Set data grouping in grid by using DataGridView component in Windows Forms applications
Home > WinForms UI Controls > User Manual > Collection of Grid Grouping in C#

Groups Collection of C#.NET Component

The Data Grid Control provides easy implementation of grouping data in multiple levels in a single table. It is able to group data in different criteria and create a tree of groups to keep the data records. The grouping function can be simply dragged and dropped to the Windows Form project. Furthermore, the Kettic Grid Component fully support customization of grouping, like sum, minimize, maximize, count, first and last as well headers formatting.

How to Access Groups Collection in C#

When we create a grid group, the group is immediately added to the Groups collection to the C# GridView template project. To access the grid group collection, we can use the simple C# code snippet below

DataGroupCollection templateGroupCollection = this.ketticGridView1.MasterTemplate.Groups;

How to Expand and Collapse Groups Collection in C#

The Kettic GridView allows the users to expand and collapse grid groups in C#.NET. The following are the C# code that allows you to expand and collapse the grid group in the Groups collection.
C# code to expand groups in Groups collection

C# code to collapse groups in Groups collection


How to Apply Group in C#

The Kettic GridView WinForms control provides the ApplyGroup property for the users to indicate if the grid column can be group or not. The GridView left the default setting as true. The C# code below shows how to disable the application.

this.ketticGridView1.Columns["Product"].ApplyGroup = false;

How to Group Hierarchical Data

The DataGroup C# Class support hierarchical data structure. With this feature, we can create a single or multiple group levels. The properties of the DataGroup allow the users to easily access to the Level, Parent and Child grid groups.
C# code used to access parent and child grid groups in Windows Forms template

int groupLevel= this.ketticGridView1.Groups[0].Level;
Group<GridViewRowInformation> parentGroup = this.ketticGridView1.Groups[0].Parent;
DataGroupCollection groups = this.ketticGridView1.Groups[0].Groups;
Additionally, there is a GroupRow property included in the DataGroup collection for accessing the header row of a group in a specific data group. The following are the C# code used to access to group header row

GridViewRowInformation groupHeaderRow = ketticGridView1.Groups[0].GroupRow;
UI Controlsfor Windows Forms
.NET WinForms UI Overview.NET WinForms UI Features.NET WinForms UI GuideC# WinForms UI DesignVB.NET WinForms UI Design
WinForms UI Controls