[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.Workbook.ShowPivotTableFieldList

ShowPivotTableFieldList Property

ShowPivotTableFieldList

Gets or sets a value indicating whether the PivotTable field list can be shown.

Use this property to determine whether users can display the PivotTable field list for PivotTables in the workbook. The default value is true.

Declaration
public bool ShowPivotTableFieldList { get; set; }
Public Property ShowPivotTableFieldList As Boolean
Implements
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Product", "Sales"},
    {"Laptop", 1200},
    {"Tablet", 900},
    {"Laptop", 700}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
pivotTable.PivotFields["Product"].Orientation = PivotFieldOrientation.RowField;
pivotTable.AddDataField(pivotTable.PivotFields["Sales"], "Sum of Sales", ConsolidationFunction.Sum);
workbook.ShowPivotTableFieldList = false;
bool canShowFieldList = workbook.ShowPivotTableFieldList;