Skip to main content

DataGridView.TotalSummaryTemplate Property

Gets or sets the template that defines the visual representation of total summary items. This is a bindable property.

Namespace: DevExpress.Maui.DataGrid

Assembly: DevExpress.Maui.DataGrid.dll

NuGet Package: DevExpress.Maui.DataGrid

Declaration

public DataTemplate TotalSummaryTemplate { get; set; }

Property Value

Type Description
DataTemplate

A template for total summaries.

Remarks

Specify the grid’s TotalSummaryTemplate property to set a common template to be applied to all total summary items displayed in the grid. Use the GridColumn.TotalSummaryTemplate property to define the visual structure for an individual column’s total summary. The TotalSummaryData class specifies the binding context for these templates.

Example

The following example configures total summary row appearance:

DevExpress Grid for .NET MAUI - Grid total summary appearance template

<dxg:DataGridView ItemsSource="{Binding Items}" AutoGenerateColumnsMode="Add">
    <dxg:DataGridView.TotalSummaries>
        <dxg:GridColumnSummary FieldName="Age" Type="Average" DisplayFormat="{}{0:N2}"/>
    </dxg:DataGridView.TotalSummaries>
    <dxg:DataGridView.TotalSummaryTemplate>
        <DataTemplate>
            <VerticalStackLayout>
                <Label Text="{Binding Column.FieldName}" TextColor="Red"/>
                <Label Text="{Binding Summary}" TextColor="Orange" FontAttributes="Bold"/>
            </VerticalStackLayout>
        </DataTemplate>
    </dxg:DataGridView.TotalSummaryTemplate>
</dxg:DataGridView>
See Also