vb.net - Find all checked nodes of parent node in treeview -
i have been trying search web information regarding child nodes, seem find i'm looking for.
basically, problem this: have determined if parent node checked in treeview control. need loop through child nodes of parent determine children checked , load these array.
as know parent node, hoping don't have loop through nodes again. want loop through child nodes of specified parent.
hope makes sense.
my treeview looks similar this:
name -->name 1 -->name 2 -->name 3 -->etc code -->code 1 -->code 2 -->code 3 -->etc
so example this:
if trvfilter.nodes.item(trvfilter.nodes.indexofkey("name")).checked = true 'loop through child nodes of parent node (name) 'if child node checked, add name of child node array end if
sorry if seems simple, i'm new vb.net , can't work out how loop through child nodes of selected parent.
thanks in advance
trvfilter.nodes collection of treenode, can loop through them for-each
for each tvn treenode in trvfilter.nodes ' stuff tvn next
Comments
Post a Comment