wpf-devexpress-dot-xpf-dot-grid-dot-treelistnode.md
Gets the collection of child nodes.
Namespace : DevExpress.Xpf.Grid
Assembly : DevExpress.Xpf.Grid.v25.2.dll
NuGet Package : DevExpress.Wpf.Grid.Core
public TreeListNodeCollection Nodes { get; }
Public ReadOnly Property Nodes As TreeListNodeCollection
| Type | Description |
|---|---|
| TreeListNodeCollection |
A TreeListNodeCollection object that is the collection of child nodes.
|
To iterate through the nodes, do the following.
Create a new instance of the TreeListNodeIterator class. Multiple constructors allow you to specify a start node or a collection of nodes, along with whether to process only visible nodes.
Use the TreeListNodeIterator.MoveNext method to iterate through nodes. The TreeListNodeIterator.Current property returns the processed node. Each time the TreeListNodeIterator.MoveNext method is called, the Node Iterator moves to the next node in the hierarchy and updates the TreeListNodeIterator.Current property. If the current node is the last node, the TreeListNodeIterator.MoveNext method returns false.
To learn more, see Binding to Self-Referential Data Structure and Nodes.
The following code snippet (auto-collected from DevExpress Examples) contains a reference to the Nodes 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.
if(iterator.Current.HasChildren) {
this.AttachItems(iterator.Current.Nodes);
}
If iterator.Current.HasChildren Then
Me.AttachItems(iterator.Current.Nodes)
End If
See Also