Hi Marc,
Thanks for contacting Syncfusion support.
We have analyzed your query. We can achieve your requirement (“How can I easily copy / duplicate my treeview with all its content and selections to a second treeview”) in TreeView control by using getTreeData public method.
This method is used to get updated data source after performing some operation such as drag and drop, node editing, adding and removing node from client side in TreeView. It will return the updated data source as JSON array object. Please refer the below code sample,
[Script]
var treeobj = $("#<%=Treeview.ClientID%>").data("ejTreeView");
var dataSource = treeobj.getTreeData();
var treedata = JSON.stringify({ sessionval: dataSource });
|
We can save this data source into session. We can retain this data source from session in another page and assign this data source to another TreeView.
For your reference, we have prepared a sample based on this, and it can be downloaded from the following location: Sample
Please let us know whether the provided sample is helpful in achieving your requirement. If not, get back to us with more information to proceed further.
Regards,
Piramanayagam R