Welcome Guest Search | Active Topics | Sign In | Register

TreeView ClientSide Drag Drop Options
Sunil
Posted: Monday, February 18, 2008 11:53:10 PM
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

eo_support
Posted: Tuesday, February 19, 2008 6:23:14 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
Hi,

Unfortunately this is not supported. You might want to consider combining the two TreeViews into one. Each as a top level node.

Thanks
Sunil
Posted: Friday, February 22, 2008 1:03:44 AM
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
eo_support
Posted: Friday, February 22, 2008 6:38:26 AM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,098
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.html
http://www.essentialobjects.com/ViewDoc.aspx?t=EO.Web.TreeNodeCollection.Remove.html

For example:

Code: C#
TreeView1.Nodes.Clear();


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


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.