[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Collapse]WPF Controls
  Prerequisites
 [Expand]What's Installed
 [Expand].NET Core 3 Support
 [Expand]Common Concepts
 [Expand]MVVM Framework
 [Collapse]Controls and Libraries
   Reporting
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Implementation Details
   [Expand]Views
   [Expand]Grid View Data Layout
   [Expand]Binding to Data
   [Expand]Master-Detail Data Representation
   [Expand]Data Editing and Validation
   [Expand]Grouping
   [Expand]Filtering and Searching
   [Expand]Sorting
   [Collapse]Data Summaries
     Total Summary
     Group Summary
     Node Summary
     Custom Summary
     Runtime Summary Editor
     Summary Customization
   [Expand]Paging and Scrolling
   [Expand]Focus, Navigation, Selection
   [Expand]Drag-and-Drop
   [Expand]Conditional Formatting
   [Expand]Appearance Customization
   [Expand]MVVM Enhancements
   [Expand]Printing and Exporting
   [Expand]Miscellaneous
   [Expand]Performance Improvement
   [Expand]Design-Time Features
   [Expand]Visual Elements
   [Expand]End-User Capabilities
   [Expand]Examples
  [Expand]Ribbon, Bars and Menu
  [Expand]Charts Suite
  [Expand]Pivot Grid
  [Expand]Scheduler
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Tree List
  [Expand]Gauge Controls
  [Expand]Map Control
  [Expand]Layout Management
  [Expand]Windows Modern UI
  [Expand]Printing-Exporting
  [Expand]Data Editors
  [Expand]Navigation Controls
  [Expand]Spell Checker
  [Expand]Property Grid
  [Expand]PDF Viewer
  [Expand]TreeMap Control
  [Expand]Gantt Control
  [Expand]Diagram Control
  [Expand]Windows and Utility Controls
   Dialogs, Notifications and Panels
  [Expand]Scheduler (legacy)
 [Expand]Scaffolding Wizard
 [Expand]Localization
  Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Office File API
[Expand]Reporting
[Expand]Report and Dashboard Server
[Expand]Dashboard
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Data Summaries

The GridControl allows you to display summary information about groups of rows or individual data columns. For example, you can display the number of records, the minimum or maximum value, etc. This summary information is called data summary.

Expanded Create a Summary

The GridControl supports Total and Group summaries:

Tip

Demos:

Requires a WPF Subscription. Download

The GridSummaryItem objects represent data summaries. You can specify the field against whose values the summary is calculated, the aggregate function, and the summary value format. The GridControl.TotalSummary collection stores Total summaries, the GridControl.GroupSummary collection stores Group summaries.

Expanded Recalculate Summary on Data Updates

The GridControl updates its summary values after you post an edited row's changes to a data source. Call the DataViewBase.CommitEditing method in the GridViewBase.CellValueChanged event handler to update summary values each time a cell value is edited:

The GridControl does not update its summaries if you modify the control's data source directly (without using the control's UI). Set the DataControlBase.AllowLiveDataShaping property to true to make the control recalculate summaries when the data source changes.

Optimized Summary Recalculation

The GridControl can use an optimized summary recalculation mechanism, which processes only changed data records if an update is needed. As a result, the time required to update summary values does not depend on the number of records.

Set the GridControl.OptimizeSummaryCalculation property to true to enable the optimized summary recalculation. The GridControl should be bound to an ObservableCollection or ChunkList<T> whose items implement the INotifyPropertyChanged and INotifyPropertyChanging interfaces. The GridControl cannot optimize the recalculation of Custom Summaries and summaries for Unbound Columns.

Expanded Summary for Selection

The GridControl can calculate summaries against selected rows and cells:

Set the DataViewBase.SummaryCalculationMode property to SelectedRows (see GridSummaryCalculationMode.SelectedRows) / Mixed (see GridSummaryCalculationMode.Mixed) to make the GridControl calculate all summaries within its view against selected rows.

Note

Tip

Demo: Data Grid - Web Style Row Selection

Requires a WPF Subscription. Download

You can create an individual summary for selected rows/cells and set its SummaryItemBase.CalculationMode property to SelectedRows (see GridSummaryCalculationMode.SelectedRows) / Mixed (see GridSummaryCalculationMode.Mixed):

Tip

Demo: Data Grid - Multi Row Selection

Requires a WPF Subscription. Download

Note

The GridControl in Server Mode or bound to an ICollectionView / Virtual Source does not calculate summaries for selection.

Expanded See Also

Is this topic helpful?​​​​​​​