Feedback
Add TreeView node traversal methods for Desktop and Web
- Status
- Fixed
- Fixed in
- v26.10.4
- Area
- desktop web
- Source discussion
- https://forum.objo.dev/d/1389-iterate-through-the-nodes-in-a-treeview
- Last updated
- 2026-10-30
Upvotes
0 upvotes
Uses your Objo forum account.
Public summary
Add convenient methods for iterating through TreeView nodes in both Desktop and Web projects:
TreeView.RootNodes()returns the tree's immediate root nodes.TreeViewNode.Children()returns a node's immediate children.TreeView.AllNodes()returns every node, visiting each parent before its children and preserving sibling order. Descendants of collapsed nodes are included.
Each method returns an Array(Of TreeViewNode) containing references to the existing nodes, so developers can use a normal For Each loop to read or update node text, tags and other properties without writing a recursive traversal helper.
The returned array captures membership and order when the method is called. Subsequent additions or removals in the tree do not change that array. Rearranging or otherwise editing the array does not rearrange or edit the tree's structure.
Programmatic reordering and sorting of tree nodes are outside this request.