A newer version of this page is available. Switch to the current version.

TreeListSummaryItem Class

A summary item.

Namespace: DevExpress.Xpf.Grid

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

Declaration

public class TreeListSummaryItem :
    SummaryItemBase
Public Class TreeListSummaryItem
    Inherits SummaryItemBase

Related API Members

The following members accept/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 Overview.

Examples

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>
See Also