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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to add summary row in GridControl?

Platform: WinForms |
Control: GridControl
Tags: summaries, row

The GridControl doesn’t support summaries by default. If you want to implement the summary row, use the “FormulaCell” cell type and set the formula to summarize the values.


For example, in the below sample, the customized summary row is added in the 10th row of the GridControl.


Code Snippet


this.gridControl1.CoveredRanges.Add(GridRangeInfo.Cells(10, 4, 10, 5));
this.gridControl1.CoveredRanges.Add(GridRangeInfo.Cells(10, 1, 10, 3));
this.gridControl1[10, 4].CellType = GridCellTypeName.FormulaCell;
this.gridControl1[10, 4].Text = string.Format("=Sum({0}{1}:{0}{2})", GridRangeInfo.GetAlphaLabel(1), this.gridControl1.TopRowIndex, this.gridControl1.RowCount - 1);
this.gridControl1[10, 1].Text = "Total value for first column";
this.gridControl1[10, 1].Font.FontStyle = FontStyle.Bold;



Me.gridControl1.CoveredRanges.Add(GridRangeInfo.Cells(10, 4, 10, 5))
Me.gridControl1.CoveredRanges.Add(GridRangeInfo.Cells(10, 1, 10, 3))
Me.gridControl1(10, 4).CellType = GridCellTypeName.FormulaCell
Me.gridControl1(10, 4).Text = String.Format("=Sum({0}{1}:{0}{2})", GridRangeInfo.GetAlphaLabel(1), Me.gridControl1.TopRowIndex, Me.gridControl1.RowCount - 1)
Me.gridControl1(10, 1).Text = "Total value for first column"
Me.gridControl1(10, 1).Font.FontStyle = FontStyle.Bold


Summary Row in GridControl:

Showing summary row in GridControl


Sample Link:

C#: SummaryRow_C#

VB: SummaryRow_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile