Skip to main content
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.v24.1.Core.dll

NuGet Package: DevExpress.Spreadsheet.Core

Declaration

bool MergeTitles { get; set; }

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.

View Example

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

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

See Also