GridColumnSummary.FieldName Property

Gets or sets the field name of the column for which a summary should be calculated. This is a bindable property.

Namespace: DevExpress.Mobile.DataGrid

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

Declaration

[XtraSerializableProperty]
public string FieldName { get; set; }
<XtraSerializableProperty>
Public Property FieldName As String

Property Value

Type Description
String

A String value that specifies the field name of the column whose values are used for summary calculation.

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