Back to Devexpress

PivotViewOptions.GrandTotalCaption Property

officefileapi-devexpress-dot-spreadsheet-dot-pivotviewoptions-b2839826.md

latest2.6 KB
Original Source

PivotViewOptions.GrandTotalCaption Property

Gets or sets the text to be displayed in grand totals for rows and columns in a pivot table.

Namespace : DevExpress.Spreadsheet

Assembly : DevExpress.Spreadsheet.v25.2.Core.dll

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
string GrandTotalCaption { get; set; }
vb
Property GrandTotalCaption As String

Property Value

TypeDescription
String

A String value that specifies the text label to be displayed in the grand total column and grand total row.

|

Property Paths

You can access this nested property as listed below:

Object TypePath to GrandTotalCaption
PivotTable

.View .GrandTotalCaption

|

Remarks

Use the GrandTotalCaption property to specify a custom label for grand totals in a PivotTable report. By default, the “Grand Total” string is used as the label for both the grand total column and grand total row.

To display or hide grand totals for rows and columns in a PivotTable report, use the PivotLayout.ShowRowGrandTotals and PivotLayout.ShowColumnGrandTotals properties.

csharp
pivotTable.View.GrandTotalCaption = "Total Sales";
vb
pivotTable.View.GrandTotalCaption = "Total Sales"

The image below illustrates the result of code execution.

See Also

ShowRowGrandTotals

ShowColumnGrandTotals

PivotViewOptions Interface

PivotViewOptions Members

DevExpress.Spreadsheet Namespace