How to group a column programmatically in WinForms GridGroupingControl
15 Jun 20211 minute to read
To group a column programmatically, use the following code.
//Shows the GroupDropArea.
this.gridGroupingControl1.ShowGroupDropArea = true;
//Groups by "Col1".
this.gridGroupingControl1.TableDescriptor.GroupedColumns.Add("Col1", ListSortDirection.Ascending);
'Shows the GroupDropArea.
Me.gridGroupingControl1.ShowGroupDropArea = True
'Groups by "Col1".
Me.gridGroupingControl1.TableDescriptor.GroupedColumns.Add("Col1", ListSortDirection.Ascending)