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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Caption text for group headers

Thread ID:





77998 Nov 25,2008 04:03 AM UTC Nov 25,2008 11:30 AM UTC WinForms 1
Tags: Grouping
Administrator [Syncfusion]
Asked On November 25, 2008 04:03 AM UTC


I am using GridGroupingControl of Syncfusion version need to know how I can set any desired text for the group headers in GridGroupingControl.For eg caption for 1st group if "aaa", for second is "abc" etc.

Jisha Joy [Syncfusion]
Replied On November 25, 2008 11:30 AM UTC

Hi Keshav,

We appreciate your interest in Syncfusion products.

After setting the HeaderText for the columns, you can specify the GroupByOptions.CaptionText for that column setting the header text instead of the default caption (the default setting is:
.CaptionText = "{CategoryName}: {Category} - {RecordCount} Items";).

Here is some code:

this.gridGroupingControl1.TableDescriptor.Columns["Col1"].HeaderText = "MyColumn";
this.gridGroupingControl1.TableDescriptor.Columns["Col1"].GroupByOptions.CaptionText = "MyColumn : {Category} - {RecordCount} Items";

Another option is to replace it dynamically by handling GridGroupingControl.QueryCellStyleInfo, checking for e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell.



This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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