Log In
[Expand]General Information
[Collapse]WinForms Controls
 [Expand]What's Installed
 [Expand]Build an Application
 [Collapse]Controls and Libraries
  [Expand]Forms and User Controls
  [Expand]Messages, Notifications and Dialogs
  [Expand]Editors and Simple Controls
  [Expand]Ribbon, Bars and Menu
  [Expand]Application UI Manager
  [Expand]Docking Library
  [Expand]Data Grid
  [Expand]Vertical Grid
  [Collapse]Pivot Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Collapse]Data Shaping
       Automatic Totals
       Grand Totals
       Custom Totals
       Running Totals
      Aggregation Levels
     Data Formatting
   [Expand]Data Analysis
   [Expand]Focus and Navigation
   [Expand]Printing and Exporting
   [Expand]Design-time Features
   [Expand]UI Elements
   [Expand]End-User Capabilities
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Chart Control
  [Expand]Map Control
  [Expand]Rich Text Editor
  [Expand]Spell Checker
  [Expand]Form Layout Managers
  [Expand]Navigation Controls
  [Expand]PDF Viewer
  [Expand]TreeMap Control
 [Expand]Common Features
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Automatic Totals

These totals are automatically calculated for groups of data. Totals are displayed for field values which have nested field values.

An automatic total is calculated for each data field. By default, if there are multiple data fields the PivotGridControl displays multiple column totals and a single row total for each field value. In the image below the PivotGrid control contains two data fields, and it displays two column totals and a single row total for appropriate field values.

To reverse the layout, and display multiple row totals and a single column total, set the PivotGridOptionsDataField.Area property to PivotDataArea.RowArea.

The summary function used to calculate automatic totals is the same as the summary function used in data cells (the cells are painted in white in the image above). This summary function is determined by the PivotGridFieldBase.SummaryType property of a corresponding data field.

To calculate a total using a different summary function, or to calculate multiple subtotals, use the Custom Totals feature.

If a specific field value has a single nesting field value, a corresponding subtotal is not displayed, by default. For instance, in the image above subtotals are not displayed for the 'Finland' row and 'Qtr 4' column, as each of them contains only a single nesting item ('Oulu' row and 'October' column, respectively). To display totals for such field values, set the PivotGridOptionsViewBase.ShowTotalsForSingleValues property to true.

To hide column and row subtotals, use the PivotGridOptionsViewBase.ShowColumnTotals and PivotGridOptionsViewBase.ShowRowTotals properties. It's also possible to hide totals that correspond to a particular data field. Use the field's PivotGridFieldOptions.ShowTotals property to do this.

Expanded See Also

How would you rate this topic?​​​​​​​