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

Declaration

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

Property Value

Type Description
DataTemplate

The summary item template.

Remarks

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.

xmlns:dxi="http://schemas.devexpress.com/winfx/2008/xaml/core/internal"

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

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

See Also