Home All Groups Group Topic Archive Search About
Author
17 Jun 2006 10:07 AM
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

Author
19 Jun 2006 3:15 PM
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

Show quoteHide quote
"andreas" <andr***@pandora.be> wrote in message
news:ovQkg.486911$ZV4.12407837@phobos.telenet-ops.be...
> 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
>
>
>
Author
19 Jun 2006 5:40 PM
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


Show quoteHide quote
"andreas" <andr***@pandora.be> wrote in message
news:ovQkg.486911$ZV4.12407837@phobos.telenet-ops.be...
> 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
>
>
>