Back to Devexpress

PivotField.SubtotalCaption Property

officefileapi-devexpress-dot-spreadsheet-dot-pivotfield-3b2d0907.md

latest2.3 KB
Original Source

PivotField.SubtotalCaption Property

Gets or sets the text to be displayed in the field’s subtotal row or column heading.

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

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

Property Value

TypeDescription
String

A String value that specifies the custom subtotal label.

|

Remarks

Use the SubtotalCaption property to specify the text to be displayed in the subtotal row or subtotal column displayed for each item in the specified PivotField if this field is currently shown as an outer row or column field.

csharp
pivotTable.Fields["Category"].SubtotalCaption = "Total Sales";
vb
pivotTable.Fields("Category").SubtotalCaption = "Total Sales"

The image below illustrates the result of code execution.

Tip

The subtotal rows for items of an outer row field in compact or outline form are displayed only when the field’s PivotFieldLayout.SubtotalOnTop property is false , so that subtotals are shown below of each item in the field.

See Also

PivotField Interface

PivotField Members

DevExpress.Spreadsheet Namespace