Hi James,
This can be achieved by handling the QueryCellStyleInfo event and set the value of SummaryEmptyCell text to sum of the all summary value present in a summary row. You can use the GetSummaries method to get all updated summaries in a GridGroup. Here is a code snippet to show this.
private void gridGroupingControl1_QueryCellStyleInfo(object sender, Syncfusion.Windows.Forms.Grid.Grouping.GridTableCellStyleInfoEventArgs e)
{
if( e.TableCellIdentity.TableCellType == GridTableCellType.SummaryEmptyCell )
{
Element el = e.TableCellIdentity.DisplayElement;
GridTable table = e.TableCellIdentity.Table;
GridSummaryRow row = e.TableCellIdentity.DisplayElement as GridSummaryRow;
GridSummaryRowDescriptor summaryRowDescriptor = row.SummaryRowDescriptor;
int sum = 0;
foreach( ISummary summary in el.ParentGroup.GetSummaries(table))
{
Int32AggregateSummary Int32summary = summary as Int32AggregateSummary;
if( Int32summary != null)
{
sum += Int32summary.Sum ;
}
}
e.Style.Text = sum.ToString() ;
e.Style.BackColor = Color.DeepPink;
}
}
Here is a sample.
GGCSummary3_f19cec74.zipBest Regards,
Haneef