Skip to main content

GridColumnBase.Totals Property

Gets the collection of totals for the specified Grid column.

Namespace: DevExpress.DashboardCommon

Assembly: DevExpress.Dashboard.v24.1.Core.dll

NuGet Package: DevExpress.Dashboard.Core

Declaration

[DefaultValue(null)]
public GridColumnTotalCollection Totals { get; }

Property Value

Type Default Description
GridColumnTotalCollection null

A GridColumnTotalCollection object that is the collection of Grid column totals.

Remarks

The Grid dashboard item allows you to calculate totals against values displayed in the specified column and show these totals under the column. To create a total for the required column, do the following.

  • Create the GridColumnTotal object and specify the type of summary function used to calculate a total using the GridColumnTotal.TotalType property.
  • Add the resulting GridColumnTotal object to the GridColumnBase.Totals collection. Note that you can add any number of totals for each column.

You can calculate totals for all grid column types (GridColumnBase descendants), but each column type supports only a specified set of summary functions used to calculate totals. The table below lists the total types different grid columns support.

Column Type

Supported Total Types

GridMeasureColumn

All types listed in the GridColumnTotalType enumeration.

GridDimensionColumn

GridColumnTotalType.Min

GridColumnTotalType.Max

GridColumnTotalType.Count

GridHyperlinkColumn

GridColumnTotalType.Min

GridColumnTotalType.Max

GridColumnTotalType.Count

GridDeltaColumn

GridColumnTotalType.Count

GridSparklineColumn

GridColumnTotalType.Count

Totals, except the GridColumnTotalType.Auto type, are calculated based on summary values. When the GridColumnTotal.TotalType property is set to GridColumnTotalType.Auto, the total is calculated based on values of the corresponding data field from the underlying data source. In this case, the Measure.SummaryType property value is taken into account to calculate the total. If the specified SummaryType type is not listed by the GridColumnTotalType enumeration, the Count summary function is used.

See Also