[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.IPivotTable.RowGrand

RowGrand Property

RowGrand

Gets or sets whether the PivotTable report shows grand totals for rows.

Use this property to determine whether the PivotTable displays a grand total row for the row fields.

Declaration
bool RowGrand { get; set; }
Property RowGrand As Boolean
Examples
worksheet.Range["A1:B4"].Value = new object[,] {
    {"Region", "Amount"},
    {"East", 120},
    {"West", 150},
    {"East", 90}
};
IPivotCache pivotCache = workbook.PivotCaches.Create(worksheet.Range["A1:B4"]);
IPivotTable pivotTable = worksheet.PivotTables.Add(pivotCache, worksheet.Range["D1"], "SalesPivot");
pivotTable.PivotFields["Region"].Orientation = PivotFieldOrientation.RowField;
pivotTable.PivotFields["Amount"].Orientation = PivotFieldOrientation.DataField;
bool showRowGrand = pivotTable.RowGrand;