Skip to main content

DxGrid.TotalSummary Property

Contains total summary items.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor


public RenderFragment TotalSummary { get; set; }

Property Value

Type Description

A collection of total summary items (UI fragment) that the browser renders in the grid’s markup.


The DxGrid calculates total summary values across all records and displays these values in the footer. To create the total summary, declare a DxGridSummaryItem object in the TotalSummary template and specify the SummaryType and FieldName properties.

You can set the SummaryType property to Custom and handle the CustomSummary event to create a custom summary item.

The example below demonstrates how to create total summaries:

<DxGrid Data="@Data"
        <DxGridDataColumn FieldName="CompanyName" MinWidth="100" />
        <DxGridDataColumn FieldName="City" Width="10%" />
        <DxGridDataColumn FieldName="Region" Width="10%" />
        <DxGridDataColumn FieldName="Country" Width="10%" />
        <DxGridDataColumn FieldName="UnitPrice" DisplayFormat="c" Width="10%" />
        <DxGridDataColumn FieldName="Quantity" MinWidth="80" Width="10%" />
        <DxGridDataColumn FieldName="Total"
                          UnboundExpression="[UnitPrice] * [Quantity]"
                          Width="15%" />
        <DxGridSummaryItem SummaryType="GridSummaryItemType.Count" FieldName="CompanyName" />
        <DxGridSummaryItem SummaryType="GridSummaryItemType.Min" FieldName="Quantity" />
        <DxGridSummaryItem SummaryType="GridSummaryItemType.Avg" FieldName="Quantity" ValueDisplayFormat="0.00" />
        <DxGridSummaryItem SummaryType="GridSummaryItemType.Max" FieldName="Quantity" />
        <DxGridSummaryItem SummaryType="GridSummaryItemType.Sum" FieldName="Total" />

DevExpress Blazor Grid - Total Summary

Run Demo: Grid - Total Summary Watch Video: Grid - Summary

Use the following API members to modify display text strings of total summary items:

Specifies format pattern for the summary value.
Specifies display text pattern for the summary item. A display text string can include static text and placeholders for summary value and column caption.
Handle this event to customize display text for an individual calculated summary value. The Grid event argument allows you to obtain information about the Grid’s current state and add this information to a summary item’s display text.

For more information about summaries in the Grid component, refer to the following topic: Summary in Blazor Grid.

See Also