I have been trying to search the web for information regarding child nodes, but I seem to find everything but what I'm looking for.
Basically, my problem is this: I have determined if a parent node is checked in my treeview control. What I need to do is loop through all child nodes of this parent to determine what children are checked and then load these into an array.
As I already know the parent node, I am hoping I don't have to loop through all nodes again. I want to just loop through all child nodes of a specified parent.
Hope that makes sense.
My Treeview looks similar to this:
Name
-->Name 1
-->Name 2
-->Name 3
-->Etc
Code
-->Code 1
-->Code 2
-->Code 3
-->Etc
So my example would look like this:
If trvFilter.Nodes.Item(trvFilter.Nodes.IndexOfKey("Name")).Checked = True Then
'Loop through Child Nodes of Parent Node (Name)
'If Child Node is checked, add the name of the Child node to an array
End If
Sorry if this seems simple, but I'm new to vb.net and can't work out how to loop through the child nodes of a selected parent.
Thanks in advance