Articles in this section

How to group a column in WinForms GridGroupingControl using code?

Grouping


To group a column in the code-behind, the GroupedColumns property can be used.


C#

//adding grouped columns
this.gridGroupingControl1.ShowGroupDropArea = true;
 
//Use the “MappingName” (which is the name of the column at the data table).
this.gridGroupingControl1.TableDescriptor.GroupedColumns.Add("B"); 

VB

'adding grouped columns
Me.gridGroupingControl1.ShowGroupDropArea = True
 
'Use the “MappingName” (which is the name of the column at the data table).
Me.gridGroupingControl1.TableDescriptor.GroupedColumns.Add("B") 

The screenshot below illustrates the grouped column

Show the grouped columns in GridGroupingControl


Samples:

C#: Grouped_Column

VB: Grouped_Column

 

Reference Link: Grouping

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied