DataControlBase.TotalSummarySource Property

Gets or sets the source from which the grid generates total summary items. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v21.1.Core.dll

Declaration

public IEnumerable TotalSummarySource { get; set; }

Property Value

Type Description
IEnumerable

The source from which the grid generates total summary items.

Remarks

You can define total summaries in a ViewModel and display them in the GridControl. To do this, follow the steps below:

  1. Create a collection of total summaries in a ViewModel and specify a data template that generates summaries.

  2. Assign the total summary collection to the TotalSummarySource property and the summary template to the TotalSummaryGeneratorTemplate property:

    <dxg:GridControl ...
                     TotalSummarySource="{Binding TotalSummary}"
                     TotalSummaryGeneratorTemplate="{StaticResource SummaryTemplate}">
        <dxg:GridControl.View>
            <dxg:TableView ShowTotalSummary="True"/>
        </dxg:GridControl.View>
    </dxg:GridControl>
    

Refer to the following help topic for more information: How to: Bind the Grid to Total and Group Summaries.

See Also