[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotField.EnableMultiplePageItems

EnableMultiplePageItems Property

EnableMultiplePageItems

Gets or sets whether the field can have multiple items selected in the page field.

This property applies to PivotTable fields that are placed in the page area. The default value is false.

Declaration
bool EnableMultiplePageItems { get; set; }
Property EnableMultiplePageItems As Boolean
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Date", "Amount"},
    {"2024-01", 120},
    {"2024-02", 150},
    {"2024-03", 90}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
IPivotField pageField = pivotTable.PivotFields["Date"];
pageField.Orientation = PivotFieldOrientation.PageField;
bool allowMultipleItems = pageField.EnableMultiplePageItems;