Summary Values

Description

Computes summary information, such as total, average, or minimum, for a field in the Grid. Summary values can be displayed on the Grid and used in client-side and server-side expressions.

Discussion

Summary values compute statistical information about a field in a Grid component. Summary calculations summarize all values on all pages of the Grid, not just values displayed on the visible page.

Four Summary Values
Four Summary Values

Enabling Summary Calculations

Available summary values
Available summary values

To enable summary calculations for the Grid, select the field that contains the value you'd like to summarize. Then, enable the desired summary value(s). There are several summary values available:

Summary Value
Description
Total

Numeric fields only. Displays the total value of the fields in all the records of the table.

Count

Numeric fields only. Displays the count of the fields in all the records of the table.

Average

Numeric fields only. Displays the average value of the fields in all the records of the table.

Minimum

Displays the minimum value found in the field.

Maximum

Displays the maximum value found in the field.

Standard Deviation

Numeric fields only. Displays the standard deviation of the fields in all the records of the table.

Variance

Numeric fields only. Displays the variance of the fields in all the records of the table.

First

Displays the first value found in the field.

Last

Displays the last value found in the field.

The Minimum, Maximum, First, and Last summary calculations are available for all field types. The rest of the summary calculations are only available for Numeric field types.

All summary types of a Grid
All summary types of a Grid

Customizing the Summary Value Display

When a summary calculation is enabled, it exposes two additional properties for the summary type: Display Format and In-line Style. The display format and in-line style can be used to customize the display of the value.

Display format and in-line styling properties are exposed when a summary field is enabled
Display format and in-line styling properties are exposed when a summary field is enabled

The summary value labels and display location are customized in the Summary value options for the Grid component. You can also use the BeforeSummarySectionRender server-side event to make the inline style conditional on the value of the summary field. See BeforeSummarySectionRender Event for examples.

Using Summary Values in Expressions

Summary values can be referenced in expressions for conditional row styling to customize how rows in the Grid component are rendered. See the Grid's Conditional style (client-side) or Conditional style (server-side) for more information.

Refreshing Summary Values in Editable Grids

Summary values are computed on the server. When a row in the Grid is updated, the summary value calculation is not updated unless the Grid component has been set to refresh the "Full page". The Grid's refresh behavior is controlled by the Row refresh method after edit property.

Videos

Styling Summary Grid Values

When adding summary values to a Grid, you can customize the look and feel of the values using in-line styles. You can also use the BeforeSummarySectionRender sever-side event to apply conditional styling to a summary field. In this video, we show how to add dynamic styling to summary fields using the BeforeSummarySectionRender event.

OnSummarySectionRender Event

These videos show how you can use the OnSummarySectionRender event to customize the summary section of the Grid and inject your own calculated fields into the summary section.

Contrary to what is said in this video, this feature is supported for SQL and DBF data sources.

Group Breaks Using Summary Data

Summary values can be included in Group Headers and Footers in the Grid component. In this video, we show how to add summary values in Group headers and footers.