[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotItem.ShowDetail

ShowDetail Property

ShowDetail

Gets or sets whether the pivot item is expanded so that its detail rows or columns are visible.

This property returns the current outline state of the pivot item in its parent PivotTable field.

Declaration
bool ShowDetail { get; set; }
Property ShowDetail As Boolean
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Category", "Amount"}, {"Fruit", 100}, {"Fruit", 200}, {"Drink", 50}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "PivotTable1");
pivotTable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
pivotTable.Update();
bool expanded = pivotTable.PivotFields["Category"].PivotItems["Fruit"].ShowDetail;