Skip to main content

Grand Totals

  • 2 minutes to read
In This Article

PivotGridControl can display two types of grand totals: row and column. Row Grand Total(s) are row(s) which display summary totals calculated against all rows in a pivot grid. Column Grand Total(s) are column(s) which display summary totals calculated against all columns in a pivot grid. The summary function used to calculate an automatic grand total is determined by the corresponding data field's PivotGridField.SummaryType property.

If there are multiple data fields, PivotGridControl displays multiple column grand totals (for each data field), and a single row grand total.

pivotgrid_grandtotals

To change the default text displayed within the grand total's header, use the field's PivotGridField.GrandTotalText property. Use the PivotGridField.GrandTotalCellFormat property to specify the formatting settings applied to grand total values.

#Visibility

The visibility of all column and row grand totals is specified by the PivotGridControl.ShowColumnGrandTotals and PivotGridControl.ShowRowGrandTotals properties, respectively. To hide grand totals which correspond to an individual data field, set the data field's PivotGridField.ShowGrandTotal property to false.

By default, if a single value of an outer column field is listed along the pivot grid's top edge, the column grand total(s) is not displayed. Similarly, the row grand total(s) is not displayed if a single value of an outer row field is listed along the control's left edge. To display grand totals for single field values, set the PivotGridControl.ShowGrandTotalsForSingleValues property to true.

#Location

The location of row totals and grand totals is specified by the PivotGridControl.RowTotalsLocation property. The PivotGridControl.ColumnTotalsLocation property specifies the location of column totals and grand totals.