To reproduce:
this.grid.Columns.Add(new GridViewDecimalColumn("col"));
for (int i = 0; i < 5; i++)
{
this.grid.Rows.Add(i);
}
GridViewSummaryItem stDev = new GridViewSummaryItem()
{
Name = "col",
Aggregate = GridAggregateFunction.Var // or GridAggregateFunction.StDev
};
var row = new GridViewSummaryRowItem();
row.Add(stDev);
this.grid.SummaryRowsTop.Add(row);
This will throw an exception.