The requested page is not available for the requested platform. You are viewing the content for Default platform.

GridControl.GroupSummaries Property

Provides access to group summary items.

Namespace: DevExpress.Mobile.DataGrid

Assembly: DevExpress.Mobile.Grid.v18.2.dll

Declaration

[XtraSerializableProperty]
public ObservableCollection<GridColumnSummary> GroupSummaries { get; }
<XtraSerializableProperty>
Public ReadOnly Property GroupSummaries As ObservableCollection(Of GridColumnSummary)

Property Value

Type Description
ObservableCollection<GridColumnSummary>

A collection of group summary items.

Remarks

Group summaries are displayed within group rows when data grouping is applied in the grid. Group summary items are specified by the GridColumnSummary objects and are stored within the GroupSummaries collection. This collection provides methods and properties allowing you to add, remove and access summary items.

The collection of total summaries can be accessed using the GridControl.TotalSummaries property.

Examples

This example shows how to calculate group and total summaries for grid columns using predefined aggregate functions or a custom rule.

The following data summaries are created.

  • Group summary to display the maximum value in a Total column for each group of records.
  • Total summary to calculate the sum of values by the whole Total column.
  • Custom total summary to count the number of rows whose value in the Shipped column is false.

Grid_GettingStarted_Lesson5_Result_iOS

Grid_GettingStarted_Lesson5_Result_Android_Dark

void OnCalculateCustomSummary(object sender, CustomSummaryEventArgs e) {
    if (e.FieldName.ToString () == "Shipped")
    if (e.IsTotalSummary){
        if (e.SummaryProcess == CustomSummaryProcess.Start) {
            count = 0;
        }
        if (e.SummaryProcess == CustomSummaryProcess.Calculate) {
            if (!(bool)e.FieldValue)
                count++;
            e.TotalValue = count;
        }
    }
}
See Also