[Expand]General Information
[Expand]WinForms Controls
[Collapse]ASP.NET Controls and MVC Extensions
 [Expand]What's Installed
 [Expand]Common Concepts
 [Collapse]ASP.NET WebForms Controls
   Getting Started
  [Collapse]Grid View
   [Expand]Product Information
    Getting Started
    [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
     GridView Table Layout
    Grid Designer
   [Expand]Visual Elements
   [Expand]Member Tables
  [Expand]Tree List
  [Expand]Card View
  [Expand]Chart Control
  [Expand]Pivot Grid
  [Expand]Rich Text Editor
  [Expand]Site Navigation and Layout
  [Expand]HTML Editor
  [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]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]Report and Dashboard Server
[Expand]eXpressApp Framework
[Expand]eXpress Persistent Objects
[Expand]CodeRush Classic
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation
View this topic on docs.devexpress.com (Learn more)

Predefined Aggregate Functions

When creating a summary item (an ASPxSummaryItem instance), you can define its aggregate function type via the ASPxSummaryItemBase.SummaryType property. ASPxGridView provides you with built-in implementation of the most popular aggregate functions such as Average, Count, Max, Min and Sum. Summaries of these predefined types are implemented so that they have a specific summary structure and can be localized and formatted with ease.

Expanded Summary Structure

By default, the display text representing a calculated summary consists of the summary label (that describes the applied aggregate function) and the summary display value (that is the calculated value with the applied formatting if any).

For each predefined aggregate function type, there are two default summary label representations: one is used when a summary is displayed within the associated column whose values it aggregates (specified via the ASPxSummaryItemBase.FieldName property), another is used when a summary is displayed within another column (specified via the ASPxSummaryItem.ShowInColumn or ASPxSummaryItem.ShowInGroupFooterColumn property).

Expanded Summary Text Localization

The table below describes the predefined function types, and lists the corresponding resource strings used for localization and their default format patterns.

Summary Type Description Display in Column Resource String ID Default Format
Average Specifies that a column's average value must be calculated. Calculated (FieldName) ASPxGridViewStringId.Summary_Average Avg={0}
    External (ShowInColumn, ShowInGroupFooterColumn) ASPxGridViewStringId.Summary_Average_OtherColumn Avg of {1} is {0}
Max Specifies that a column's maximum value must be calculated. Calculated (FieldName) ASPxGridViewStringId.Summary_Max Max={0}
    External (ShowInColumn, ShowInGroupFooterColumn) ASPxGridViewStringId.Summary_Max_OtherColumn Max of {1} is {0}
Min Specifies that a column's minimum value must be calculated. Calculated (FieldName) ASPxGridViewStringId.Summary_Min Min={0}
    External (ShowInColumn, ShowInGroupFooterColumn) ASPxGridViewStringId.Summary_Min_OtherColumn Min of {1} is {0}
Sum Specifies that the sum of a column's values must be calculated. Calculated (FieldName) ASPxGridViewStringId.Summary_Sum Sum={0}
    External (ShowInColumn, ShowInGroupFooterColumn) ASPxGridViewStringId.Summary_Sum_OtherColumn Sum of {1} is {0}
Count Specifies that the number of records within a column must be calculated. Any ASPxGridViewStringId.Summary_Count Count={0}

The placeholders used in format patterns are:

  • {0} - contains the calculated summary value;
  • {1} - contains the name of the column by whose values the summary is calculated (this placeholder is used when the summary text is displayed within another column).

Note that the resource strings listed in the table above are intended to localize summary label texts, but not summary display values. These resource strings can be used when you localize your application through global resources, as it is described within the Localizing ASP.NET Controls via Global Resources (Obsolete from 11.2) topic.

Expanded Summary Formatting

ASPxGridView provides you with flexible summary display text customization means. You can use the following properties to provide a custom format for the summary value or even the entire summary text displayed by a summary item.

  • Column's DisplayFormatString

    On the column level, you can define a display format for column values (via the EditPropertiesBase.DisplayFormatString property available through a column's GridViewDataColumn.PropertiesEdit property), and it will apply to column summary values as well.


    The DisplayFormatString property's setting is not in effect for a summary item if its ASPxSummaryItemBase.ValueDisplayFormat or ASPxSummaryItemBase.DisplayFormat property is specified.

  • Summary item's ValueDisplayFormat

    On the summary item level, the ASPxSummaryItemBase.ValueDisplayFormat property allows you to additionally format the calculated summary value for display purposes. The summary value pattern, specified via ValueDisplayFormat, can include static text intermixed with a single format item (indexed placeholder) - {0} - that corresponds to the calculated summary value.


    The ValueDisplayFormat property's setting is not in effect if the ASPxSummaryItemBase.DisplayFormat property is specified.

  • Summary item's DisplayFormat

    On the summary item level, use the ASPxSummaryItemBase.DisplayFormat property to define a format string specifying the display format for the entire summary. The DisplayFormat property can accept static text intermixed with two format items (indexed placeholder) - {0} and {1}. {0} corresponds to the calculated summary value, and {1} corresponds to the caption of the column, the values of which the current summary aggregates.


    If the DisplayFormat property is defined for a summary item, localization via resource strings is not in effect for this summary.

Note that you can also use the ASPxGridView.SummaryDisplayText event to provide custom display text for summaries.

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