Back to Devexpress

TreeListView Class

wpf-devexpress-dot-xpf-dot-grid-6dc3e41c.md

latest6.7 KB
Original Source

TreeListView Class

A View that displays information in a tree hierarchical structure.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public class TreeListView :
    GridDataViewBase,
    ITableView,
    IFormatsOwner
vb
Public Class TreeListView
    Inherits GridDataViewBase
    Implements ITableView,
               IFormatsOwner

The following members return TreeListView objects:

Remarks

Tip

Topics :

The TreeListView can display information as a tree, a grid, or a combination of both - in either data bound or unbound mode.

After you created and customized a new instance of the TreeListView class, you should assign the instance to the GridControl.View property.

xaml
<dxg:GridControl AutoGenerateColumns="AddNew" 
                 EnableSmartColumnsGeneration="True" 
                 ItemsSource="{Binding Customers}">
    <dxg:TreeListView Name="treeListView" AutoWidth="True"
                      KeyFieldName="ID" ParentFieldName="ParentID"
                      TreeDerivationMode="Selfreference"/>
</dxg:GridControl>

The TreeListView supports standard data-aware and presentation features such as data editing, sorting, filtering, summary calculation, built-in validation, unbound columns, runtime column customization and more.

The TreeListView has the following TreeList-specific features:

The following code snippets (auto-collected from DevExpress Examples) contain references to the TreeListView 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.

wpf-tree-list-calculate-custom-node-summaries/CS/CustomNodeSummaries_CodeBehind/MainWindow.xaml#L13

xml
<dxg:TreeListControl.View>
    <dxg:TreeListView AutoExpandAllNodes="True" AutoWidth="True"
                      KeyFieldName="ID" ParentFieldName="ParentID"

wpf-spreadsheet-chart-api/CS/SpreadsheetWPFChartAPISamples/MainWindow.xaml#L52

xml
<dxg:TreeListControl.View>
    <dxg:TreeListView x:Name="view" TreeDerivationMode="ChildNodesSelector" ChildNodesSelector="{StaticResource childrenSelector}" ShowIndicator="False" ShowColumnHeaders="False" AutoWidth="True" AllowPerPixelScrolling="False" CustomColumnDisplayText="view_CustomColumnDisplayText" />
</dxg:TreeListControl.View>

wpf-spreadsheet-pivot-table-api-examples/CS/SpreadsheetWPFPivotTableExamples/MainWindow.xaml#L52

xml
<dxg:TreeListControl.View>
    <dxg:TreeListView x:Name="view" TreeDerivationMode="ChildNodesSelector" ChildNodesSelector="{StaticResource childrenSelector}" ShowIndicator="False" ShowColumnHeaders="False" AutoWidth="True" AllowPerPixelScrolling="False" CustomColumnDisplayText="view_CustomColumnDisplayText" />
</dxg:TreeListControl.View>

wpf-richedit-document-api/CS/DXRichEditControlAPISample/MainWindow.xaml#L57

xml
<dxg:TreeListControl.View>
    <dxg:TreeListView x:Name="view" TreeDerivationMode="ChildNodesSelector" ChildNodesSelector="{StaticResource childrenSelector}" ShowIndicator="False" ShowColumnHeaders="False" AutoWidth="True" AllowPerPixelScrolling="False" CustomColumnDisplayText="view_CustomColumnDisplayText" />
</dxg:TreeListControl.View>

wpf-lookupedit-display-treelist-as-popup-content/CS/CustomTreeViewComboBox/MainWindow.xaml#L17

xml
<dxg:GridControl.View>
    <dxg:TreeListView AutoWidth="True"
                      AutoExpandAllNodes="True"

Implements

IPrintableControl

Inheritance

Show 11 items

Object DispatcherObject DependencyObject Visual UIElement FrameworkElement Control DataViewBase GridDataViewBase TreeListView GanttView

See Also

TreeListView Members

DevExpress.Xpf.Grid Namespace