[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]Prerequisites
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Collapse]Grid View
   [Expand]Product Information
    Getting Started
   [Expand]Fundamentals
   [Collapse]Concepts
    [Expand]Bind to Data
    [Expand]Data Representation Basics
    [Expand]Focus and Navigation
    [Expand]Edit Data
    [Collapse]Use Data Summaries
      Predefined Aggregate Functions
      Group Summary
      Total Summary
      Obtain Summary Values
      Custom Summary
    [Expand]Filter Data
    [Expand]Group Data
    [Expand]Sort Data
     Merge Data Cells
     Save and Restore Client Layout
    [Expand]Format Data
    [Expand]Master-Detail Relationship
     Appearance Customization
     Adaptivity
     GridView Table Layout
    [Expand]Templates
    [Expand]Export
     Toolbars
    [Expand]ASPxGridLookup
    Grid Designer
   [Expand]Visual Elements
   [Expand]Examples
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Gantt
  [Expand]Card View
   Reporting
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Spreadsheet
  [Expand]Rich Text Editor
  [Expand]Scheduler
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [Expand]Gauges
  [Expand]Vertical Grid
  [Expand]Data Editors
  [Expand]Docking and Popups
  [Expand]File Management
  [Expand]Data and Image Navigation
  [Expand]Multi-Use Site Controls
  [Expand]Spell Checker
  [Expand]Query Builder
 [Expand]ASP.NET MVC Extensions
 [Expand]Localization
 [Expand]Redistribution and Deployment
  Get More Help
 [Expand]API Reference
[Expand]ASP.NET Bootstrap Controls
[Expand]ASP.NET Core Bootstrap Controls
[Expand]WPF Controls
[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)

Group Summary

The group summary represents the value of the aggregate function calculated over all data rows within a group. Group summaries are displayed within group rows or Group Footer cells.

Group summaries are represented by the ASPxSummaryItem objects. ASPxGridView stores its group summaries within the ASPxGridView.GroupSummary collection. To manage this collection at design time, you can use the Edit Form as shown above.

The ASPxSummaryItem object provides two properties allowing you to determine the location to display the summary.

To obtain group summary values, use the following methods.

Method Description
ASPxGridView.GetGroupRowSummaryText Returns the summary text displayed within the specified group row.
ASPxGridView.GetGroupSummaryValue Returns a summary value calculated against the specified group of rows.
ASPxSummaryItem.GetGroupRowDisplayText Formats the specified value according to the current group row summary item's format settings.
ASPxGridViewSettings.ShowGroupFooter Specifies the ASPxGridView group footers visibility.
ASPxSummaryItem.GetGroupFooterDisplayText Formats the specified value according to the current total summary item's format settings, when the summary is displayed within group row footers.

Expanded Example: Creating Total and Group Summaries in Markup

The code sample below demonstrates how you can specify group and total summaries. To specify the group summary items location, the ASPxSummaryItem.ShowInColumn and ASPxSummaryItem.ShowInGroupFooterColumn properties are used.

Note that summary item four is not displayed because the 'OrderDate' column, where the item should be displayed, does not exist (the grid is grouped by the 'OrderDate' field). Summary item five is not displayed because the 'Total' group row, where the item should be displayed, does not exist (the grid is not grouped by the 'Total' field)

The image below shows the result.

Expanded Example: Creating a Group Summary in Code

This example shows how to create and customize a group summary in code.

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