Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Navigate through Tree Node

Status
Not open for further replies.

ralphtrent

Programmer
Jun 2, 2003
958
US
Hello
I have a tree node that I made via the VS Gui. I am also dynamically adding nodes to it via code. How would i know which node was selected. Currently I am going by the FullPath, but there has to be an easier way. Is there?

Thanks
 
The problem I am having with that is, the indexes are not in order meaning, the partent nodes are 0,1,2, ... but then childred nodes are 0,1,2 also, so if I select the first child node under each of my parent nodes, Ill get the same selectednode.index, 0. Know what I mean? What I would need to know is what parent node was selected first, then know what the child node is.

Any idea's?

Thanks.
 
try using both
Code:
selectednode.index
selectednode.parent.index

to uniquely identify the selected index.

-Rick

----------------------
[banghead]If you're about to post an ASP.Net question,
please don't do it in the VB.Net forum[banghead]

[monkey] I believe in killer coding ninja monkeys.[monkey]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top