Skip to main content
Row

PivotTable.ShowColumnHeaders Property

Gets or sets a value indicating whether to apply the style formatting to column headers.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Spreadsheet.v26.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

bool ShowColumnHeaders { get; set; }

Property Value

Type Description
Boolean

true, to format column headers; otherwise, false.

Remarks

Set the ShowColumnHeaders property to true to apply formatting to the title area of a pivot table where the column names are located. This area is highlighted in the following image.

Spreadsheet_PivotTable_ShowColumnHeaders

The appearance of column headers is specified by the TableStyleElementType.HeaderRow, TableStyleElementType.FirstColumnSubheading, TableStyleElementType.SecondColumnSubheading and TableStyleElementType.ThirdColumnSubheading elements of the table style applied to the pivot table.

Example

View Example

Worksheet worksheet = workbook.Worksheets["Report1"];
workbook.Worksheets.ActiveWorksheet = worksheet;

// Access the pivot table by its name in the collection.
PivotTable pivotTable = worksheet.PivotTables["PivotTable1"];
// Remove formatting from column headers.
pivotTable.ShowColumnHeaders = false;
See Also