PivotGridSettings.CustomSummary Property

Enables summary values to be calculated manually.

Namespace: DevExpress.Web.Mvc

Assembly: DevExpress.Web.Mvc5.v19.2.dll

Declaration

public PivotGridCustomSummaryEventHandler CustomSummary { get; set; }
Public Property CustomSummary As PivotGridCustomSummaryEventHandler

Property Value

Type Description
PivotGridCustomSummaryEventHandler

A PivotGridCustomSummaryEventHandler delegate method allowing you to implement custom processing.

Remarks

The PivotGrid calculates summaries against data fields. A field's PivotGridFieldBase.SummaryType property specifies the type of summary function. The control automatically calculates all the predefined summary functions (see the PivotSummaryType topic for a list of the available functions) and it allows custom summaries to be calculated manually via the CustomSummary event.

To calculate a custom summary for a specific data field set its PivotGridFieldBase.SummaryType property to PivotSummaryType.Custom. In this instance, the CustomSummary event will fire for each cell that corresponds to this data field.

For instance, you can handle the CustomSummary event to calculate custom summaries against multiple fields, particular records, etc. Use the PivotGridCustomSummaryEventArgsBase<T>.CreateDrillDownDataSource method to get a list of records that correspond to the processed cell. This list can then be traversed to calculate a custom summary. The custom summary value should be assigned to the PivotGridCustomSummaryEventArgsBase<T>.CustomValue property.

The PivotGrid calculates all the predefined summaries (AVERAGE, MIN, MAX, SUM, etc.) for each cell. The calculated summaries can be accessed via the PivotGridCustomSummaryEventArgsBase<T>.SummaryValue property. These can be used in custom summary calculations.

Note

The CustomSummary is not supported in server and OLAP modes.

See Also