Treeview - how to get value of grandchild node

K

K B

Hi, still stuck on this. Please help!

<parent>
<child>
<grandchild1/>
<grandchild2/>
<child>
</parent>
<parent>
<child>
<grandchild1/>
<grandchild2/>
<child>
</parent>

How do I get the value of the grandchild nodes? I can use:
For Each node In tvRoles.Nodes(0).ChildNodes but that only gets me to
the <child> node. How to get the <child> node's child?

TIA,
Kit
 
R

Rolf Cerff

Hello Kit,

what's about the child nodes of the node?

For Each TreeNode in tvRoles(0).ChildNodes
For Each grandchild in node.ChildNodes // grandchild shold be the
grandchild of tvRoles(0)
// do something with.

Hope that helps

Regards
Rolf
 

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

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top