Skip to main content

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.v23.1.Core.dll

NuGet Package: DevExpress.Wpf.Grid.Core


public IEnumerable TotalSummarySource { get; set; }

Property Value

Type Description

The source from which the grid generates total summary items.


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.
  2. Specify a data template that generates summaries:

        <DataTemplate x:Key="SummaryTemplate">
                <dxg:GridSummaryItem FieldName="{Binding Path=(dxci:DependencyObjectExtensions.DataContext).FieldName, RelativeSource={RelativeSource Self}}"
                                     SummaryType="{Binding Path=(dxci:DependencyObjectExtensions.DataContext).Type, RelativeSource={RelativeSource Self}, Converter={StaticResource SummaryTypeConverter}}"/>
  3. 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:TableView TotalSummaryPosition="Bottom"/>

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

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the TotalSummarySource property.


The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

See Also