officefileapi-devexpress-dot-spreadsheet-dot-pivotfield-3b2d0907.md
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
string SubtotalCaption { get; set; }
Property SubtotalCaption As String
| Type | Description |
|---|---|
| String |
A String value that specifies the custom subtotal label.
|
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.
pivotTable.Fields["Category"].SubtotalCaption = "Total Sales";
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