.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
Row

PivotLayout.MergeTitles Property

Gets or sets a value indicating whether to merge and center cells containing item labels for the outer row and column fields, subtotal and grand total captions.

Namespace: DevExpress.Spreadsheet

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

Declaration

bool MergeTitles { get; set; }
Property MergeTitles As Boolean

Property Value

Type Description
Boolean

true, to merge cells containing the outer row and column field items, subtotal and grand total labels; otherwise, false.

Remarks

The example below demonstrates how to use the MergeTitles property to merge cells containing item labels for the outer row and column fields, subtotal and grand total labels. By default, cells with the outer field items have a left-justify alignment and are displayed at the top of the item group.

Dim worksheet As Worksheet = workbook.Worksheets("Report4")
workbook.Worksheets.ActiveWorksheet = worksheet

' Access the pivot table by its name in the collection.
Dim pivotTable As PivotTable = worksheet.PivotTables("PivotTable1")
' Display the pivot table in the tabular form.
pivotTable.Layout.SetReportLayout(PivotReportLayout.Tabular)
' Merge and center cells with labels. 
pivotTable.Layout.MergeTitles = True

The following image illustrates the result of code execution. Item labels for the outer row field, grand total and subtotal captions are centered within the merged cells. Note that the MergeTitles property is in effect for the outer row items only when a pivot table is shown in tabular form.

SpreadsheetPivotTable_MergeTitles

See Also