How to Apply Grouping Properties for TopLevelGroups

3 Jan 20201 minute to read

Grouping properties for TopLevelGroups can be applied using the code snippet below.

//Hides the AddNewRecord field before details row.
this.gridGroupingControl1.TableDescriptor.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails=false;

//Hides the Header cells.
this.gridGroupingControl1.TableDescriptor.TopLevelGroupOptions.ShowColumnHeaders=false;

//Adds the Filter Bar to the Child level groups.
this.gridGroupingControl1.TableDescriptor.TopLevelGroupOptions.ShowFilterBar=true;

//Sets the caption.
this.gridGroupingControl1.TableDescriptor.TopLevelGroupOptions.CaptionText="Custom";

//Shows the group footer.
this.gridGroupingControl1.TableDescriptor.TopLevelGroupOptions.ShowGroupFooter=true;
'Hides the AddNewRecord before details.
Me.gridGroupingControl1.TableDescriptor.TopLevelGroupOptions.ShowAddNewRecordBeforeDetails=False

'Hides the column headers.
Me.gridGroupingControl1.TableDescriptor.TopLevelGroupOptions.ShowColumnHeaders=False

'Adds the Filter Bar to the Top level groups.
Me.gridGroupingControl1.TableDescriptor.TopLevelGroupOptions.ShowFilterBar=True

'Sets the caption.
Me.gridGroupingControl1.TableDescriptor.TopLevelGroupOptions.CaptionText="Custom"

'Shows the group footer.
Me.gridGroupingControl1.TableDescriptor.TopLevelGroupOptions.ShowGroupFooter=True