wpf-devexpress-dot-xpf-dot-grid-dot-treeviewcontrol-b180df5e.md
Gets or sets a selector that returns the list of child nodes for the processed node. This is a dependency property.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public IChildNodesSelector ChildNodesSelector { get; set; }
Public Property ChildNodesSelector As IChildNodesSelector
| Type | Description |
|---|---|
| IChildNodesSelector |
The child nodes selector.
|
The Child Nodes Selector returns node children. You can use the returned list of child nodes to create a hierarchical data structure for different object types.
public class ProjectObject : BaseObject {
public ObservableCollection<ProjectStage> Stages { get; set; }
}
public class ProjectStage : BaseObject {
public ObservableCollection<Task> Tasks { get; set; }
}
public class Task : BaseObject {
State state;
// ...
}
Public Class ProjectObject
Inherits BaseObject
Public Property Stages As ObservableCollection(Of ProjectStage)
End Class
Public Class ProjectStage
Inherits BaseObject
Public Property Tasks As ObservableCollection(Of Task)
End Class
Public Class Task
Inherits BaseObject
Private state As State
' ...
End Class
Create a selector class that implements IChildNodesSelector, and override the SelectChildren(Object) method that returns node children.
Assign the Child Nodes Selector to the ChildNodesSelector property.
Refer to the following help topic for more information: Hierarchical Data Structure.
See Also