Skip to main content
A newer version of this page is available. .

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.v18.2.Core.dll

Declaration

public DataTemplate TotalSummaryGeneratorTemplate { get; set; }

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.

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

Note

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