Articles in this section

How to change the caption text in WinForms GridGroupingControl?

Change the caption text


You can change the caption text by setting the TopLevelGroupOptions.CaptionText property value as some desired text. You can also change the caption text of the nested tables by using the NestedTableGroupOptions.CaptionText property.


C#

int count = this.gridGroupingControl1.TableModel.RowCount;

//Setting the CaptionText for the GridGroupingControl
this.gridGroupingControl1.TopLevelGroupOptions.CaptionText = "This Parent table has {RecordCount} records";

//To change the Caption text of Nested Child table
this.gridGroupingControl1.NestedTableGroupOptions.CaptionText = "Nested Table";

VB

Dim count As Integer = Me.gridGroupingControl1.TableModel.RowCount

'Setting the CaptionText for the GridGroupingControl
Me.gridGroupingControl1.TopLevelGroupOptions.CaptionText = "This Parent table has {RecordCount} records"

'To change the Caption text of Nested Child table
Me.gridGroupingControl1.NestedTableGroupOptions.CaptionText = "Nested Table"

The following screenshot displays the modified caption text for the Grid.

Show change the caption text for the grid


Figure
1:  Modified caption text for the Grid

Note:

The RecordCount is a token that is used to get the record count for the table.

 

Samples:

C#: ChangeCaptionTextForGGC

VB:  ChangeCaptionTextForGGC

 

Reference Link: GroupCaptionSection

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