[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotTable.LayoutRowDefault

LayoutRowDefault Property

LayoutRowDefault

Gets the default row layout type that is applied when PivotFields are added to the PivotTable for the first time.

This setting determines the initial row layout used for newly added PivotFields, such as compact, outline, or tabular layout.

Declaration
LayoutRowType LayoutRowDefault { get; set; }
Property LayoutRowDefault As LayoutRowType
Examples
worksheet.Range["A1:C4"].Value = new object[,] {
    {"Region", "Product", "Amount"},
    {"East", "Apple", 120},
    {"West", "Apple", 80},
    {"East", "Orange", 90}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:C4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["E1"], "SalesPivot");
pivotTable.LayoutRowDefault = LayoutRowType.TabularRow;
LayoutRowType layoutType = pivotTable.LayoutRowDefault;