[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.LayoutRowType

LayoutRowType Enum

Specifies the row axis layout type for a pivot table.

Use this enum with SetRowAxisLayout(LayoutRowType) to change the display layout of a pivot table's row axis. The default layout is CompactRow.

Note: If the layout is set to TabularRow, the SubtotalLocationType can only be set to Bottom.

Namespace: GrapeCity.Documents.Excel
Assembly: DS.Documents.Excel.dll
Syntax
public enum LayoutRowType
Public Enum LayoutRowType
Examples
object sourceData = new object[,] {
    {"Order ID", "Product", "Category", "Amount"},
    {1, "Bose 785593-0050", "Consumer Electronics", 4270},
    {2, "Canon EOS 1500D", "Consumer Electronics", 8239},
    {3, "Iphone XR", "Mobile", 9062}
};
worksheet.Range["A1:D4"].Value = sourceData;
IPivotCache pivotcache = workbook.PivotCaches.Create(worksheet.Range["A1:D4"]);
IPivotTable pivottable = worksheet.PivotTables.Add(pivotcache, worksheet.Range["A6"], "pivottable1");
pivottable.PivotFields["Category"].Orientation = PivotFieldOrientation.RowField;
pivottable.PivotFields["Product"].Orientation = PivotFieldOrientation.RowField;
pivottable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
pivottable.SetRowAxisLayout(LayoutRowType.TabularRow);

Fields

Name Description
CompactRow

Compact Row.

OutlineRow

Outline Row.

TabularRow

Tabular Row.