Back to Devexpress

PivotTable.ShowRowHeaders Property

officefileapi-devexpress-dot-spreadsheet-dot-pivottable-0949a79f.md

latest6.3 KB
Original Source

PivotTable.ShowRowHeaders Property

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

Namespace : DevExpress.Spreadsheet

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

NuGet Package : DevExpress.Spreadsheet.Core

Declaration

csharp
bool ShowRowHeaders { get; set; }
vb
Property ShowRowHeaders As Boolean

Property Value

TypeDescription
Boolean

true , to format row headers; otherwise, false.

|

Remarks

Set the ShowRowHeaders property to true to apply formatting to the rows containing item labels for the outer row fields. These rows are highlighted in the following image.

The appearance of row headers is specified by the TableStyleElementType.FirstRowSubheading, TableStyleElementType.SecondRowSubheading and TableStyleElementType.ThirdRowSubheading elements of the table style applied to the pivot table.

Example

View Example

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

// Access the pivot table by its name in the collection.
PivotTable pivotTable = worksheet.PivotTables["PivotTable1"];
// Add the "Region" field to the column axis area. 
pivotTable.ColumnFields.Add(pivotTable.Fields["Region"]);
// Remove formatting from row headers.
pivotTable.ShowRowHeaders = false;
vb
Dim worksheet As Worksheet = workbook.Worksheets("Report1")
workbook.Worksheets.ActiveWorksheet = worksheet

' Access the pivot table by its name in the collection.
Dim pivotTable As PivotTable = worksheet.PivotTables("PivotTable1")
' Add the "Region" field to the column axis area. 
pivotTable.ColumnFields.Add(pivotTable.Fields("Region"))
' Remove formatting from row headers.
pivotTable.ShowRowHeaders = False

The following code snippets (auto-collected from DevExpress Examples) contain references to the ShowRowHeaders 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.

wpf-spreadsheet-pivot-table-api-examples/CS/SpreadsheetWPFPivotTableExamples/CodeExamples/PivotTableFormattingActions.cs#L72

csharp
// Remove formatting from row headers.
pivotTable.ShowRowHeaders = false;
#endregion #RowHeaders

winforms-spreadsheet-pivot-table-api/CS/SpreadsheetPivotTableExamples/CodeExamples/PivotTableFormattingActions.cs#L72

csharp
// Remove formatting from row headers.
pivotTable.ShowRowHeaders = false;
#endregion #RowHeaders

spreadsheet-document-api-pivot-table-examples/CS/SpreadsheetDocServerPivotAPI/CodeExamples/PivotTableFormattingActions.cs#L80

csharp
// Remove formatting from row headers.
pivotTable.ShowRowHeaders = false;
#endregion #RowHeaders

wpf-spreadsheet-pivot-table-api-examples/VB/SpreadsheetWPFPivotTableExamples/CodeExamples/PivotTableFormattingActions.vb#L69

vb
' Remove formatting from row headers.
            pivotTable.ShowRowHeaders = False
' #End Region ' #RowHeaders

winforms-spreadsheet-pivot-table-api/VB/SpreadsheetPivotTableExamples/CodeExamples/PivotTableFormattingActions.vb#L69

vb
' Remove formatting from row headers.
            pivotTable.ShowRowHeaders = False
' #End Region ' #RowHeaders

spreadsheet-document-api-pivot-table-examples/VB/SpreadsheetDocServerPivotAPI/CodeExamples/PivotTableFormattingActions.vb#L73

vb
' Remove formatting from row headers.
            pivotTable.ShowRowHeaders = False
#End Region ' #RowHeaders

See Also

How to: Control Style Options

PivotTable Interface

PivotTable Members

DevExpress.Spreadsheet Namespace