treenode find node

A

andreas

Hi,
I have a problem with treenode
I know the node.text of a selected node in a variable and then some nodes
are removed but not the selected node who is no more selected (so using
index and level are changed)
How can I find the node by the name I know.
I know a methode in a treenode with one rootnode with a recurse procedure to
test each node But is there no faster way?
Thanks for any response
 
C

Claes Bergefall

Since you're not removing the selected node you can store a reference to it
in a variable (i.e. the whole node, not just the text). Once done just use
the Selected property to select it again

/claes
 
G

giannik

in .net 2.0 this is supported . There is
a treeview.Nodes.Find(NodeName, SearchCildren)
method that goes down the treeview and returns an array of treenodes.
Giannis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top