)
We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to show the caption text at end of the grid in WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl |
Published Date: February 15, 2016 |
Last Revised Date: January 2, 2020
Tags: captiontext

Show the caption text

By default, there is no support for showing the Caption at the end of the Grid. In order to show the caption text at the end of the grid, GroupFooterSection can be used (which will be displayed at the end of the table) and cell value of Group Footer Section cell is assigned to CaptionText.

C#

//Display the GroupFooter cell
this.gridGroupingControl1.TopLevelGroupOptions.ShowGroupFooter = true;
//Set the caption text to be displayed
String CaptionText = this.gridGroupingControl1.TableDescriptor.Name + ":" + this.gridGroupingControl1.Table.Records.Count + " Items";
this.gridGroupingControl1.Appearance.GroupFooterSectionCell.CellValue = CaptionText;
//Disable the editing
this.gridGroupingControl1.Appearance.GroupFooterSectionCell.CellType = GridCellTypeName.Static;
//Set the height of the GroupCaption
this.gridGroupingControl1.TableOptions.GroupFooterSectionHeight = 20; 

 

VB

'Display the GroupFooter cell
Me.gridGroupingControl1.TopLevelGroupOptions.ShowGroupFooter = True
'Set the caption text to be displayed
Dim CaptionText As String = Me.gridGroupingControl1.TableDescriptor.Name & ":" & Me.gridGroupingControl1.Table.Records.Count & " Items"
Me.gridGroupingControl1.Appearance.GroupFooterSectionCell.CellValue = CaptionText
'Disable the editing
Me.gridGroupingControl1.Appearance.GroupFooterSectionCell.CellType = GridCellTypeName.Static
'Set the height of the GroupCaption 
Me.gridGroupingControl1.TableOptions.GroupFooterSectionHeight = 20

Screenshot

Show the caption text at end of the grid

Samples:

C#: Show_CaptionText_CS

VB: Show_CaptionText_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon