Populate one Treeview from another C#

293 views Asked by At

I would like to be able to take a treeview that i have created from a directory, and when the user checks off a checkbox next to a node, i would like that node to appear in the second tree uding the same directory structure

root
 a
 b
  b1
  b2
 c

if b1 was selected the second treeview would show

root 
 b
  b1

I know there is a clone method, but i cannot seem to get it to work properly if more than one is checked, since other than using a mouseclick argument, i do not know how to get the location of the node that has been checked. And since i have a recursive aftercheck function that will check all nodes under a parent, i dont know how to keep track of which nodes were checked. I have a function that tells me which nodes are checked according to their name(not location) so i can compare the names with the "checked list".

0

There are 0 answers