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
  [Collapse]Data Grid
   [Expand]Getting Started
   [Expand]Binding to Data
   [Expand]Grid View
   [Expand]View Technology
     Summaries Overview
     Tutorial: Custom Summary Functions
     Tutorial: Format Summary Text
     Tutorial: Group Summaries
     Tutorial: Obtain Summary Values
     Tutorial: Sort Group Rows by Summary Values
     Tutorial: Total Summaries
     Total Summary
     Group Summary
     Custom Aggregate Functions
     Format Summary Values
     Obtain Summary Values
     Sorting Group Rows by Summary Values
     Controlling Visibility of Group Summaries for Individual Group Rows
   [Expand]Data Editing
   [Expand]Filtering and Locating Rows
   [Expand]Focus and Selection Handling
   [Expand]Processing Rows
   [Expand]Formatting Cell Values
   [Expand]Master-Detail Relationships
   [Expand]Asynchronous Image Load
   [Expand]Export and Printing
   [Expand]Appearance and Conditional Formatting
   [Expand]Batch Modifications
   [Expand]Hit Information
   [Expand]Popup Menus
   [Expand]Saving and Restoring Layouts
   [Expand]Visual Elements
   [Expand]Design-Time Features
   [Expand]End-User Capabilities
    Included Components
  [Expand]Vertical Grid
  [Expand]Pivot Grid
  [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]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Report Server
[Expand]eXpressApp Framework
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Summaries Overview

Grid Views allow you to display brief information about groups of rows or particular columns. For instance, you can obtain the number of records or maximum value, etc. Such information is called a summary. This topic provides basic information about summaries.

Expanded Online Videos

Expanded Summaries Overview

There are two types of summaries that can be displayed by Grid Views.

  • Total Summaries

    These are aggregate function values calculated over all the records within a View and displayed within a view footer under a particular column.

  • Group Summaries

    The aggregate function value calculated over all records within a group and displayed in the group row or group footer.

The summaries are represented by GridSummaryItem class objects or their descendants, which allows you to set the field against whose values the summary is calculated, the aggregate function applied to field values, and the summary value format.

The GridSummaryItem.FieldName property specifies the dataset field whose values are used for summary calculation. The GridSummaryItem.SummaryType property represents the SummaryItemType enumerator. This property enables you to choose one of the predefined aggregate functions or implement your own. For the latter purpose, the GridSummaryItem.SummaryType property value must be set to SummaryItemType.Custom. See the Custom Aggregate Functions topic for details. The GridSummaryItem.DisplayFormat property specifies how the summary value is formatted. The Format Summary Values topic describes in detail how to use format strings.

You can also invoke a summary or change its type via the footer context menu. The context menu enables you to choose predefined aggregate functions used to calculate a summary value. When the GridSummaryItem.SummaryType property is set to Custom, the context menu is not in effect.

If a View footer's cell was clicked to activate a context menu, the GridView.GridMenuItemClick event occurs. You can use the event to customize the grid menu. When an item from the context menu is clicked, the GridView.GridMenuItemClick event is raised. It enables you to provide custom responses to clicking context menu items. See the Implementing Custom Behavior for Popup Menus for details.

The grid control enables you to access and operate with summary values. To get more information see the Obtain Summary Values topic.

Expanded See Also

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