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.
Unfortunately, activation email could not send to your email. Please try again.

GGC : Grouping columns

Thread ID:

Created:

Updated:

Platform:

Replies:

39355 Jan 5,2006 01:24 AM Jan 12,2006 08:16 AM Windows Forms 6
loading
Tags: Grouping
Anupama
Asked On January 5, 2006 01:24 AM

I have a grid in which 2 of the columns are CategoryID and CategoryDesc. I want categorize based on categoryid but in the CaptionText I want to show the CategoryDesc. How can I do that? None of the captiontext tokens allow you to select text from another column.

stanleyj [Syncfusion]
Replied On January 5, 2006 05:48 AM

Hi Anupama, The text in caption cell can be changed handling the QueryCellStyleInfo handler. private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) { if(e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell) e.Style.Text = "My Text"; } Best regards, Stanley

Anupama
Replied On January 10, 2006 01:49 AM

Thanks Stanley! That worked.

Anupama
Replied On January 12, 2006 12:34 AM

How can I get the tokens to display programatically in the Caption Text? Specifically the {RecordCount} token. The documentation says this comes from the CaptionSection.ParentGroup.GetFilteredRecordCount() but CaptionSection is a member of which class in e.TableCellIdentity? (I need to write this piece of code in QueryCellStyleInfo event handler). >Hi Anupama, > >The text in caption cell can be changed handling the QueryCellStyleInfo handler. > > private void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e) > { > if(e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell) > e.Style.Text = "My Text"; > } > >Best regards, >Stanley

stanleyj [Syncfusion]
Replied On January 12, 2006 07:58 AM

Hi Anupama, Let me know if this will work for you. e.TableCellIdentity.DisplayElement.ParentGroup.GetFilteredRecordCount() Best regards, Stanley

stanleyj [Syncfusion]
Replied On January 12, 2006 07:58 AM

Hi Anupama, Let me know if this will work for you. e.TableCellIdentity.DisplayElement.ParentGroup.GetFilteredRecordCount() Best regards, Stanley

Anupama
Replied On January 12, 2006 08:16 AM

Yes! This works exactly the way its supposed to. Thanks! >Hi Anupama, > > >Let me know if this will work for you. > >e.TableCellIdentity.DisplayElement.ParentGroup.GetFilteredRecordCount() > >Best regards, >Stanley

CONFIRMATION

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.

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.

;