wpf-devexpress-dot-xpf-dot-grid-dot-treelistview-474e17f0.md
Gets or sets the name of the ‘children’ field. This is a dependency property.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public string ChildNodesPath { get; set; }
Public Property ChildNodesPath As String
| Type | Description |
|---|---|
| String |
A String value that specifies the ‘children’ field name.
|
View Example: Implement the Child Nodes Path
Use the Child Nodes Path to bind the TreeListView to a collection if all objects have the same children field. An example of such a structure is shown below:
public class BaseObject {
public string Name { get; set; }
public String Executor { get; set; }
public ObservableCollection<Task> Tasks { get; set; }
}
public class ProjectObject : BaseObject {}
public class Task : BaseObject {
public string State { get; set; }
}
Public Class BaseObject
Public Property Name As String
Public Property Executor As String
Public Property Tasks As ObservableCollection(Of Task)
End Class
Public Class ProjectObject
Inherits BaseObject
End Class
Public Class Task
Inherits BaseObject
Public Property State As String
End Class
ChildNodesPath property to the children field name.ChildNodesSelector.Set the TreeListView.AllowChildNodeSourceUpdates property to true to update child nodes when you set the collection property to a new value.
Refer to the following help topic for more information: Bind to Hierarchical Data Structure.
See Also