DataControlBase.TotalSummaryGeneratorTemplate Property

Gets or sets a template that describes total summaries. This is a dependency property.

Namespace: DevExpress.Xpf.Grid

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


public DataTemplate TotalSummaryGeneratorTemplate { get; set; }
Public Property TotalSummaryGeneratorTemplate As DataTemplate

Property Value

Type Description

The summary item template.


The DevExpress WPF Grid Control supports summary binding. The grid can be bound to a collection of objects containing summary settings, described in a Model or ViewModel, minimizing the need for 'code-behind'. The Grid Control generates summary items based on templates. A template that describes total summaries should be assigned to the grid's TotalSummaryGeneratorTemplate property.

The DataTemplate defined in the TotalSummaryGeneratorTemplate should include an item of the GridSummaryItem type. See the example below.


<DataTemplate x:Key="SummaryTemplate"> 
        <dxg:GridSummaryItem FieldName="{Binding Path=(dxi:DependencyObjectExtensions.DataContext).FieldName, RelativeSource={RelativeSource Self}}" 
                            SummaryType="{Binding Path=(dxi:DependencyObjectExtensions.DataContext).Type, RelativeSource={RelativeSource Self}}"/> 

To learn more, see Binding to Total and Group Summaries.

See Also