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

TreeListSummaryItem Class

A summary item.

Namespace: DevExpress.Xpf.Grid

Assembly: DevExpress.Xpf.Grid.v19.2.dll

Declaration

public class TreeListSummaryItem :
    SummaryItemBase

The following members return TreeListSummaryItem objects:

Remarks

The DXTreeList allows you to display concise information about individual columns. For instance, you can display the total number of nodes or maximum value, etc. This is called a summary.

The DXTreeList supports the Total Summary type. It stores total summary items within the DevExpress.Xpf.Grid.TreeListControl.TotalSummary collection. Individual summary items are represented by the TreeListSummaryItem objects.

To learn more, see Data Summaries.

Example

This example shows how to display totals. It is shown how to create summary items in code-behind and XAML.

Note

A complete sample project is available at https://github.com/DevExpress-Examples/calculating-totals-e3273.

<Window x:Class="DXTreeList_Totals.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525"
        xmlns:dxg="http://schemas.devexpress.com/winfx/2008/xaml/grid">
    <Grid>
        <dxg:TreeListControl Name="treeListControl1" AutoPopulateColumns="True">
            <dxg:TreeListControl.View>
                <dxg:TreeListView Name="treeListView1" AutoWidth="True"
                                  KeyFieldName="ID" ParentFieldName="ParentID"
                                  ShowTotalSummary="True"/>
            </dxg:TreeListControl.View>
            <dxg:TreeListControl.TotalSummary>
                <dxg:TreeListSummaryItem FieldName="Name" SummaryType="Count" />
            </dxg:TreeListControl.TotalSummary>
        </dxg:TreeListControl>
    </Grid>
</Window>

The following code snippets (auto-collected from DevExpress Examples) contain references to the TreeListSummaryItem class.

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