DxDataGridSummaryItem Class

A summary item.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v21.2.dll

Declaration

public class DxDataGridSummaryItem :
    DxSummaryItemBase<ISummaryItemModel>

Remarks

The Data Grid supports two summary types:

  • Total summaries are calculated across all grid rows and displayed in the grid’s footer. To create a total summary, add a DxDataGridSummaryItem object to the Data Grid’s TotalSummary collection.
  • Group summaries are calculated across rows in individual groups and displayed group rows. To create a group summary, add a DxDataGridSummaryItem object to the Data Grid’s GroupSummary collection.
<DxDataGrid Data="@Data" CssClass="w-100">
    <Columns>
        <DxDataGridColumn Field="@nameof(Invoice.CustomerName)" />
        <DxDataGridColumn Field="@nameof(Invoice.City)" Width="200px" />
        <DxDataGridColumn Field="@nameof(Invoice.Region)" Width="120px" />
        <DxDataGridColumn Field="@nameof(Invoice.Country)" Width="200px" />
        <DxDataGridSpinEditColumn Field="@nameof(Invoice.UnitPrice)" DisplayFormat="c" Width="120px" />
        <DxDataGridSpinEditColumn Field="@nameof(Invoice.Quantity)" Width="120px" />
    </Columns>
    <TotalSummary>
        <DxDataGridSummaryItem SummaryType="SummaryItemType.Count" Field="@nameof(Invoice.CustomerName)" />
        <DxDataGridSummaryItem SummaryType="SummaryItemType.Min" Field="@nameof(Invoice.Quantity)" DisplayFormat="Min: {0:0.##}"/>
        <DxDataGridSummaryItem SummaryType="SummaryItemType.Avg" Field="@nameof(Invoice.Quantity)" DisplayFormat="Avg: {0:0.##}" />
        <DxDataGridSummaryItem SummaryType="SummaryItemType.Max" Field="@nameof(Invoice.Quantity)" DisplayFormat="Max: {0:0.##}"/>
    </TotalSummary>
</DxDataGrid>

Data Grid Total Summary

Run Demo: Data Grid - Summary

Inheritance

Object
ComponentBase
DevExpress.Blazor.Base.DxAsyncDisposableComponent
DxSettingsComponent
DxSummaryItemBase<DevExpress.Blazor.Internal.ISummaryItemModel>
DxDataGridSummaryItem
See Also