How to: Add Multiple Total Summaries for Column

This example demonstrates how to add multiple total summaries for a column at runtime.

Adding Summaries In Code - Result

gridView1.Columns["UnitsInStock"].Summary.Add(DevExpress.Data.SummaryItemType.Average, "UnitsInStock", "Avg={0:n2}");
gridView1.Columns["UnitsInStock"].Summary.Add(DevExpress.Data.SummaryItemType.Sum, "UnitsInStock", "Sum={0}");
GridColumnSummaryItem item = new GridColumnSummaryItem(DevExpress.Data.SummaryItemType.Max, "UnitsInStock", "Max={0}");
gridView1.Columns["UnitsInStock"].Summary.Add(item);