treeview - How to find the all parent node of a child node from bottom to top in tree view control using vb.net -


here have below treeview shown in image.

treeview

for child node g g want fetch parent nodes name bottom top , store list. means in list should add g g, f f, d d, b b.

please suggest solution.

thanks in advance...

this code obtain information parents node.

dim selectednode treenode = yourtreeviewselectednode     dim nodepath string= ""   'will store full path   'you full path of node  'parent\child\grandchild 'the procedure fill nodepath    obtainnodepath(selectednode,nodepath)  msgbox(nodepath)    private sub obtainnodepath(byval node treenode, byref path string)      if node.parent isnot nothing          path = io.path.combine(node.text, path)    ' parent\child           if node.parent.level = 0 exit sub          'call again method check if can extract more info         obtainnodepath(node.parent, path)      end if  end sub 

Comments

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -