|
Rank: Member Groups: Member
Joined: 1/6/2008 Posts: 13
|
Hi,
I have two treeview controls on a page. The requirement is to drag and drop the node from one tree view to the second one and viceversa [Client Side]. Can you get me some code to do the same.
Thanks
Regards
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi,
Unfortunately this is not supported. You might want to consider combining the two TreeViews into one. Each as a top level node.
Thanks
|
|
Rank: Member Groups: Member
Joined: 1/6/2008 Posts: 13
|
Hi,
Is it possible to do the same using Server Side coding. Any code example will be helpful.
Thanks
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,218
|
Hi, There is no such saying as "move" a brance from one tree view to another tree view. You basically delete nodes from the first TreeView and then create new nodes on the second TreeView. To delete TreeNode from the first TreeView, you would usually call these methods: http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.NavigationItemCollection.Clear.htmlhttp://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.TreeNodeCollection.Remove.htmlFor example:
Would clear the whole TreeView.
Code: C#
TreeView1.Nodes[0].ChildNodes.Clear();
Would clear all child nodes of the first root node. To add a node into a TreeView, you would do something like this:
Code: C#
EO.Web.TreeNode newNode = new EO.Web.TreeNode("new node");
TreeView1.Nodes.Add(newNode);
Hope this helps. Thanks
|
|