Skip to main content
A newer version of this page is available. .

DxGrid.GroupSummary Property

Contains group summary items.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.1.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public RenderFragment GroupSummary { get; set; }

Property Value

Type Description
RenderFragment

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

Remarks

The DxGrid calculates group summary values across all records in a group. To create the group summary, declare a DxGridSummaryItem object in the GroupSummary 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 Grid displays summary values in the group row after the group header. To show the summary value in the group footer, set the FooterColumnName property to the target column’s name.

A summary item has the following predefined display format: {summary label}: {summary value}. The following members allow you to customize this format:

ValueDisplayFormat property
Specifies the display format for the summary value ({summary value}).
CustomizeSummaryDisplayText event
Allows you to customize the entire summary display text.
<DxGrid @ref="Grid"
        Data="@Data"
        ShowGroupPanel="true"
        SizeMode="Params.SizeMode" 
        KeyboardNavigationEnabled="Params.KeyboardNavigationEnabled">
    <Columns>
        <DxGridDataColumn FieldName="Country" GroupIndex="0" Width="10%" />
        <DxGridDataColumn FieldName="City" GroupIndex="1" Width="10%" />
        <DxGridDataColumn FieldName="CompanyName" MinWidth="100" />
        <DxGridDataColumn FieldName="UnitPrice" DisplayFormat="c" Width="10%" />
        <DxGridDataColumn FieldName="Quantity" Width="10%" />
        <DxGridDataColumn FieldName="Total"
                          UnboundType="GridUnboundColumnType.Decimal"
                          UnboundExpression="[UnitPrice] * [Quantity]"
                          DisplayFormat="c"
                          MinWidth="100"
                          Width="15%" />
    </Columns>
    <GroupSummary>
        <DxGridSummaryItem SummaryType="GridSummaryItemType.Count" FieldName="CompanyName" />
        <DxGridSummaryItem SummaryType="GridSummaryItemType.Sum" FieldName="Total" />
    </GroupSummary>
</DxGrid>

DevExpress Blazor Grid - Group Summary

To refresh all group summary values in the Grid component, call the RefreshSummary() method.

Run Demo: Grid - Group Summary Run Demo: Grid - Group Footer Summary

Watch Video: Grid - Summary

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

See Also