Total Summary

The Grid is currently available as a community technology preview (CTP).
Vins et alcools Chevalier Reims   France $14.00 12 $168.00
Vins et alcools Chevalier Reims   France $10.00 10 $100.00
Vins et alcools Chevalier Reims   France $35.00 5 $175.00
Toms Spezialitäten Münster   Germany $19.00 9 $171.00
Toms Spezialitäten Münster   Germany $42.00 40 $1,680.00
Hanari Carnes Rio de Janeiro RJ Brazil $8.00 10 $80.00
Hanari Carnes Rio de Janeiro RJ Brazil $42.00 35 $1,470.00
Hanari Carnes Rio de Janeiro RJ Brazil $17.00 15 $255.00
Victuailles en stock Lyon   France $17.00 6 $102.00
Victuailles en stock Lyon   France $16.00 15 $240.00

Our Blazor Grid component can compute summaries for content in its entirety and at each individual group level. Total summaries are calculated across all Grid records and displayed in the Grid’s footer. To create total summaries, declare DxGridSummaryItem objects in the TotalSummary template.

Key DxGridSummaryItem properties are summarized below.

  • SummaryType – Specifies the aggregate function (Sum, Min, Max, Avg, or Count).
  • FieldName – Specifies the name of the data field whose values are used to calculate the summary. The Min and Max functions support data fields whose values can be compared. The Avg and Sum functions work with numeric fields only. For the Count function, you do not need to set this property.
  • FooterColumnName – Specifies the name of the column used to display the summary. If you do not define this property, the summary value is displayed under the column bound to the same data field (FieldName.
  • ValueDisplayFormat – Specifies the pattern used to format the summary value. If you do not define this property, the summary applies the format from the column bound to the same data field (FieldName. The Grid supports standard formats. For more information, see the following help topic: Format types in .NET.

Group Summary

The Grid is currently available as a community technology preview (CTP).
Country: Argentina (Count: 34, Sum of Total: $8,158.00)
Country: Austria (Count: 125, Sum of Total: $139,924.00)
Country: Belgium (Count: 56, Sum of Total: $35,122.00)
Country: Brazil (Count: 203, Sum of Total: $115,121.00)
Country: Canada (Count: 75, Sum of Total: $55,358.00)
Country: Denmark (Count: 46, Sum of Total: $34,800.00)
Country: Finland (Count: 54, Sum of Total: $19,780.00)
Country: France (Count: 184, Sum of Total: $85,624.00)
Country: Germany (Count: 328, Sum of Total: $244,614.00)
Country: Ireland (Count: 55, Sum of Total: $57,393.00)

Group summaries are calculated across all rows within a group and displayed in the group row or group footer. To create group summaries, declare DxGridSummaryItem objects in the GroupSummary template.

You can use the following DxGridSummaryItem properties:

  • SummaryType – Specifies the function type (Sum, Min, Max, Avg, or Count).
  • FieldName – Specifies the name of the data field whose values are used to calculate the summary. The Min and Max functions support data fields whose values can be compared. The Avg and Sum functions work with numeric fields only. For the Count function, you do not need to set this property.
  • ValueDisplayFormat – Specifies the pattern used to format the summary value. If you do not define this property, the summary applies the format from the column bound to the same data field (FieldName. For more information about supported formats, see the following help topic: Format types in .NET.
  • FooterColumnName – Specifies the name of the group footer column that displays the summary value. If you do not define this property, the summary value is displayed in the group row.

In this demo, group rows display the number of rows and total prices within groups.

Group Footer Summary

The Grid is currently available as a community technology preview (CTP).
Order Date: 7/4/2014
Order Date: 7/5/2014
Order Date: 7/8/2014
Order Date: 7/9/2014
Order Date: 7/10/2014
Order Date: 7/11/2014
Order Date: 7/12/2014
Order Date: 7/15/2014
Order Date: 7/16/2014
Order Date: 7/17/2014

The group footer contains cells that correspond to data columns. To display a summary value in a group footer column, set the summary item’s FooterColumnName to the name of this column.

You can use the Group Footer Display Mode option above to choose whether and how to display group footers:

  • Never – Group footers are always hidden even if they contain summary values.
  • IfExpanded – Group footers are displayed for expanded groups only.
  • Always – Group footers are always visible regardless of the groups’ expanded states and even if they do not contain summary values.
  • Auto - Group footers are displayed if they contain summary values and the corresponding groups are expanded. Otherwise, group footers are hidden.

Custom Summary

The Grid is currently available as a community technology preview (CTP).
Vins et alcools Chevalier Reims   France $14.00 12
Vins et alcools Chevalier Reims   France $10.00 10
Vins et alcools Chevalier Reims   France $35.00 5
Toms Spezialitäten Münster   Germany $19.00 9
Toms Spezialitäten Münster   Germany $42.00 40
Hanari Carnes Rio de Janeiro RJ Brazil $8.00 10
Hanari Carnes Rio de Janeiro RJ Brazil $42.00 35
Hanari Carnes Rio de Janeiro RJ Brazil $17.00 15
Victuailles en stock Lyon   France $17.00 6
Victuailles en stock Lyon   France $16.00 15

Our Blazor Grid allows you to compute total and group summaries based on custom logic. To create a custom summary, declare a DxGridSummaryItem object in the TotalSummary or GroupSummary template and set the SummaryType property to Custom. Then, handle the Grid’s CustomSummary event to implement the summary calculation algorithm. This event occurs multiple times as follows:

  • Before grid rows are processed. The event argument’s SummaryStage property value is Start. At this stage, you can initialize a summary value.
  • For each data row in the processed range. The SummaryStage property value is Calculate. At this stage, you can calculate a summary value.
  • After grid rows are processed. The SummaryStage property value is Finalize. At this stage, you can finalize summary calculation.

You can also handle the CustomizeSummaryDisplayText event to change the summary’s display text.

In this demo, the custom summary calculates the number of records whose Quantity field value is less than 5.