PivotTable.ShowColumnHeaders Property
Gets or sets a value indicating whether to apply the style formatting to column headers.
Namespace: DevExpress.Spreadsheet
Assembly: DevExpress.Spreadsheet.v24.2.Core.dll
NuGet Package: DevExpress.Spreadsheet.Core
Declaration
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.
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
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;
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowColumnHeaders property.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.