DxDataGridSummaryItem Class

A summary item.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v20.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="@Orders">
    <Columns>
        <DxDataGridDateEditColumn Field="@nameof(Order.OrderDate)" Width="240px" />
        <DxDataGridComboBoxColumn Field="@nameof(Order.CountryId)"
                                  Caption="Ship Country"
                                  Data="@Countries"
                                  ValueFieldName="@nameof(Country.Id)"
                                  TextFieldName="@nameof(Country.CountryName)"
                                  FilteringMode="DataGridFilteringMode.Contains"
                                  Width="250px" />
        <DxDataGridColumn Field="@nameof(Order.Product)" />
        <DxDataGridSpinEditColumn Field="@nameof(Order.UnitPrice)"
                                  DisplayFormat="c"
                                  Width="120px" />
    </Columns>
    <TotalSummary>
        <DxDataGridSummaryItem Field=@nameof(Order.OrderDate)
                               SummaryType=SummaryItemType.Min
                               DisplayFormat="First: {0:D}" />
        <DxDataGridSummaryItem Field=@nameof(Order.UnitPrice)
                               SummaryType=SummaryItemType.Sum
                               DisplayFormat="Sum: {0:c}" />
        <DxDataGridSummaryItem ShowInColumn=@nameof(Order.CountryId)
                               SummaryType=SummaryItemType.Count />
   </TotalSummary>
</DxDataGrid>

Data Grid Total Summary

For more information, refer to the following help topic: Summary.

Run Demo: Data Grid - Summary

Inheritance

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