LS
Lingaraj S
Syncfusion Team
August 20, 2009 01:51 PM UTC
Hi David,
Thank you for your interest in Syncfusion products.
Please refer the below code to hide the summary column in top level group.
this.gridGroupingControl1.QueryCellStyleInfo += new GridTableCellStyleInfoEventHandler(gridGroupingControl1_QueryCellStyleInfo);
void gridGroupingControl1_QueryCellStyleInfo(object sender, GridTableCellStyleInfoEventArgs e)
{
if (e.TableCellIdentity.TableCellType==GridTableCellType.SummaryFieldCell||e.TableCellIdentity.TableCellType==GridTableCellType.GroupCaptionSummaryCell)
{
// To hide the column
if (e.TableCellIdentity.SummaryColumn != null&&e.TableCellIdentity.SummaryColumn.Name == "specifyyousummarycolumnname")
{
if (e.TableCellIdentity.DisplayElement.ParentGroup.IsTopLevelGroup)
e.Style.Text = 0;
}
}
}
Please let me know if you have any queries.
Regards,
Lingaraj S.