Back to Devexpress

TreeListView.TreeDerivationMode Property

wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-d7cb06d3.md

latest6.5 KB
Original Source

TreeListView.TreeDerivationMode Property

Gets or sets the tree derivation mode. This is a dependency property.

Namespace : DevExpress.Xpf.Grid

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

NuGet Package : DevExpress.Wpf.Grid.Core

Declaration

csharp
public TreeDerivationMode TreeDerivationMode { get; set; }
vb
Public Property TreeDerivationMode As TreeDerivationMode

Property Value

TypeDescription
TreeDerivationMode

A TreeDerivationMode enumeration value that specifies the tree derivation mode.

|

Available values:

NameDescription
Selfreference

Builds a tree from a self-referential data structure. To learn more, see Bind to Self-Referential Data Structure.

| | ChildNodesSelector |

You should manually write code to specify where a data object’s child items come from by creating a selector class. To learn more, see Bind to Hierarchical Data Structure.

| | HierarchicalDataTemplate |

Builds a tree using Hierarchical Data Templates. To learn more, see Hierarchical Data Templates.

|

Remarks

In data bound mode, the TreeListView can display information in a tree from either a self-referential (flat) or hierarchical data structure. For each type of a data structure, it provides the corresponding tree derivation mode(s), specified via the TreeDerivationMode property.

If the TreeDerivationMode property is set to TreeDerivationMode.HierarchicalDataTemplate, optimized mode is automatically disabled.

To learn more, see Binding to Hierarchical Data Overview.

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

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-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#L21

xml
ParentFieldName="ParentID"
                      TreeDerivationMode="Selfreference"/>
</dxg:GridControl.View>

wpf-grid-sync-isnodeexpanded-with-view-model/CS/DevExpress.Example04/MainWindow.xaml#L30

xml
<dxg:GridControl.View>
    <dxg:TreeListView AllowPerPixelScrolling="True" ShowTotalSummary="True" TreeDerivationMode="HierarchicalDataTemplate"/>
</dxg:GridControl.View>

See Also

Bind to Self-Referential Data Structure

Implement the Child Nodes Path

Use the Child Nodes Selector to Display Hierarchical Data

Load Nodes Asynchronously Without Locking the Application's UI

Use Hierarchical Data Templates to Build a Tree

TreeListView Class

TreeListView Members

DevExpress.Xpf.Grid Namespace