Link to home
Start Free TrialLog in
Avatar of szx248
szx248

asked on

Treeview Select Node ?

In code how can I select a specific Node in a Treeview? I now the exact row it is on.
Avatar of wildcard76
wildcard76
Flag of Türkiye image

Hi,


myTree.Nodes(0)
should give you the first node of the tree, on the upmost level.

This should work fine if you are trying to reach some node on the upmost level.

If you have nested nodes, you can also reach themby extending the notation like,

myTree.Nodes(0).nodes(4).nodes(2)

this will give you the 3rd node of the 5th node of the first node on the root :)

hope this helps

Regards

Avatar of szx248
szx248

ASKER

I am not asking how to reference it, but how to SELECT it, meaning that it should be equivlant to when you click with the mouse a that Node
ASKER CERTIFIED SOLUTION
Avatar of wildcard76
wildcard76
Flag of Türkiye image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial