Home Forums WinForms controls Xceed Grid for WinForms How can I add a SummaryRow to a grid? C# Reply To: How can I add a SummaryRow to a grid? C#

User (Old forums)
Member
Post count: 23064

You don’t need to add a SummaryCell. It is created for every column when you drop the SummaryRow in the designer. Moreover, if you add a column at run time, it will also create the corresponding cell for the SummaryRow.

So you simply need to get a reference to the cell you want, and set it up.

e.g.:

SummaryCell cellsumCOST = this.summaryRow1.Cells[ “COST” ];

//then setup the cell
cellsumCOST.StatFieldName = “COST”;
cellsumCOST.StatFunction = Xceed.Grid.StatFunction.Sum;

Imported from legacy forums. Posted by André (had 314 views)