Group Summary

A group summary represents a value of the aggregate function calculated over all data rows within a group. Group summaries are displayed within group rows, and are stored within the grid's GridControl.GroupSummary collection.

Group Summary

Displaying Group Summaries

To create a group summary item at design time, use the GroupSummary Collection Editor.

GroupSummary Collection Editor

    <Grid:GridSummaryItem DisplayFormat="{}{0:c}" FieldName="UnitPrice" SummaryType="Max" />

To display group summaries in code, create a new instance of the SummaryItemBase class, specify its properties and add it to the GridControl.GroupSummary collection.

DevExpress.UI.Xaml.Data.GridSummaryItem groupSummaryItem = new DevExpress.UI.Xaml.Data.GridSummaryItem();
groupSummaryItem.FieldName = "UnitPrice";
groupSummaryItem.DisplayFormat = "Max: {0:c2}";
groupSummaryItem.SummaryType = DevExpress.Data.SummaryItemType.Max;

Align Group Summaries By Columns

By default, group summaries are displayed to a group row's right. To display group summaries under corresponding columns, set the GridControl.GroupSummaryDisplayMode to GroupSummaryDisplayMode.AlignByColumns.