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. Image for the cookie policy date
close icon

GroupCaptionCell

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


2 Replies

AD Administrator Syncfusion Team January 29, 2007 11:33 AM UTC

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.


AD Administrator Syncfusion Team January 29, 2007 12:59 PM UTC

Hi Clay,

thanks - this works fine for me :-)

Loader.
Live Chat Icon For mobile
Up arrow icon