Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

GridColumn.TotalSummaryTemplate Property

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

Namespace: DevExpress.Maui.DataGrid

Assembly: DevExpress.Maui.DataGrid.dll

NuGet Package: DevExpress.Maui.DataGrid

#Declaration

C#
public DataTemplate TotalSummaryTemplate { get; set; }

#Property Value

Type Description
DataTemplate

A template for the column’s total summary.

#Remarks

Use a column’s TotalSummaryTemplate property to define the visual structure of a total summary displayed for this column. To set a common template to be applied to all total summary items displayed in the grid, use the DataGridView.TotalSummaryTemplate property. The TotalSummaryData class specifies the binding context for these templates.

#Example

The following example configures total summary appearance for an individual column:

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

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