Skip to main content

PivotGridFieldBase.GrandTotalText Property

Gets or sets the text displayed within the Grand Total‘s header that corresponds to the current field.

Namespace: DevExpress.XtraPivotGrid

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

NuGet Packages: DevExpress.PivotGrid.Core, DevExpress.Win.Navigation

Declaration

[XtraSerializableProperty]
[XtraSerializablePropertyId(1)]
public string GrandTotalText { get; set; }

Property Value

Type Description
String

A string that represents the text displayed within the Grand Total‘s header that corresponds to the current field.

Remarks

This property allows the default text displayed within the Grand Total‘s header that corresponds to the current field to be overridden. This text is displayed when the current field is displayed within the Data Area and only when either of the following conditions is met:

  • there is no visible field in the Column Header Area. In this case, the XtraPivotGrid control displays a single column which contains grand total values. The GrandTotalText property allows you to customize the text within this column header.
  • there is no visible field in the Row Header Area. In this case, the XtraPivotGrid control displays a single row which contains grand total values. The GrandTotalText property allows you to customize the text within this row header.

When the GrandTotalText property is set to an empty string the default text for the Grand Total’s header is constructed in the form: “FieldCaption Total”. Here “FieldCaption” is the actual text displayed within the Field Header, which can be customized via the PivotGridFieldBase.Caption property. The default “Total” substring can be localized. See the Localization document for more information.

To get the actual text which is displayed within the Grand Total’s header use the PivotGridFieldBase.GetGrandTotalText method.

In the following images a data field’s GrandTotalText property is set to the default and custom values respectively:

GrandTotalText Value Image
The GrandTotalText property of the “Total Sum” data field is set to an empty string. PivotGridField.GrandTotalText_Default
The GrandTotalText property of the “Total Sum” data field is set to “Total Sum”. PivotGridField.GrandTotalText_Custom
See Also