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.

GroupCaptionCell

Thread ID:

Created:

Updated:

Platform:

Replies:

55334 Jan 29,2007 04:25 AM Jan 29,2007 07:59 AM Windows Forms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 29, 2007 04:25 AM

Hi,

we are using a business object which is bound to a GGC. One property of the business object is of kind enum. This enum property is localized via a custom EnumConverter class. Everything works fine.

The problem occurs when enabling grouping. When I drop the column (which hold the enum type) to the group drop area i get the following GroupCaptionCell:


"Parameter Name: Value1 - 10 Items"

but the corresponding converted enum value is "LocalizedValue1". So I would suggest something like this:

"Parameter Name: LocalizedValue1 - 10 Items"

Now I thought I can handle this GroupCaptionCell type by myself in the QueryCellStyleInfo event. But how can I find out the current "CategoryName" and "Category" so that I can handle the localization?

Cheers,
Chris


Administrator [Syncfusion]
Replied On January 29, 2007 06:33 AM

Try code like:

void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionCell)
{
GridCaptionRow cap = e.TableCellIdentity.DisplayElement as GridCaptionRow;
if(cap != null && cap.ParentGroup != null && cap.ParentGroup.Category != null)
{
//cap.ParentGroup.Category // the value
// cap.ParentGroup.CategoryColumns[0].Name // the column name
}
}
}


to see if this gives you what you need.

Administrator [Syncfusion]
Replied On January 29, 2007 07:59 AM

Hi Clay,

thanks - this works fine for me :-)

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.

;