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