Link to home
Start Free TrialLog in
Avatar of bluebutterfly
bluebutterfly

asked on

copying from a treeview to another

hi
I am bluebutterfly and I have a problem.
I have a treeview and I need to copy a node from it to another treeview, I know the method "nodes.add" but in this method I need to give the data, by example: the properties text,index,relationship, etc.

Then, Does Exists something that :    treeview2.item=treeview1.item       ?????

Thanks!!!!
Avatar of endeavor
endeavor

The short answer is no - there is no tv2.item = tv1.item.  I normally implement this using a recursive function that does a depth-first traversal of the tree structure building the target tree from the source tree.  it is a very manual process but it works.  

If you need an example I can probably put one together as an answer.
ASKER CERTIFIED SOLUTION
Avatar of bad_ima
bad_ima

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial