This example shows how to create a self-referential data structure and display it in the TreeListView.
To display this tree structure, your data source should include the following fields of the same data type:
- Key Field - This field should contain unique values used to identify nodes. Assign its name to the TreeListView.KeyFieldName property.
- Parent Field - This field should contain values that indicate parent nodes. Assign its name to the TreeListView.ParentFieldName property.
Set the TreeListView.TreeDerivationMode property to Selfreference
to enable the self-referential mode.
- Employees.cs (VB: Employees.vb)
- MainWindow.xaml (VB: MainWindow.xaml)
- Bind to Self-Referential Data Structure
- Display Hierarchical Data
- TreeListView.KeyFieldName
- TreeListView.ParentFieldName
- WPF Tree List - Use the Child Nodes Selector to Create a Hierarchical Data Structure
- WPF Tree List - Implement the Child Nodes Path
- WPF Tree List - Use the Hierarchical Data Template to Build a Tree
(you will be redirected to DevExpress.com to submit your response)