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

CharAggregate

I am trying to use the CharAggregate summary type to show a description in a summary column.

I can not get this to display anything other than a null character, if I use Maximum etc. If I put actual text, "Test Desc" in for the format then that will display for all summaries.

Any ideas?

1 Reply

AD Administrator Syncfusion Team March 21, 2007 09:54 PM UTC

Hi Hu Anderson,

Here is a code snippet that demonstrates the technique to set the user defined value in the summary column of the GroupCaptionSummaryCell.

///Code>>>>>>
this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);
void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType == GridTableCellType.GroupCaptionSummaryCell)
{
if (e.TableCellIdentity.SummaryColumn != null && e.TableCellIdentity.SummaryColumn.Name.Equals("Sum"))
{
GridCaptionRow gcr = e.TableCellIdentity.DisplayElement as GridCaptionRow;
GridCaptionSection gcs = gcr.ParentSection as GridCaptionSection;

Group grp = gcs.ParentGroup;
if (grp.IsTopLevelGroup)
return;

string value = grp.Category.ToString();
e.Style.Text = "Test desc" + e.TableCellIdentity.RowIndex; //value.ToString();
}
}
}
///Code>>>>>>

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon