This is a migrated thread and some comments may be shown as answers.

Root Node - Disabled - but allow drops?

2 Answers 91 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Mike Philbrick
Top achievements
Rank 1
Mike Philbrick asked on 01 May 2009, 04:32 PM
Hello,

I'm building a web page that is similar to the Telerik Treeview Drag and Drop demo that's located here, http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/draganddropnodes/defaultcs.aspx.

You can drag and drop nodes from the RadTreeView1 to RadTreeView2 and vice versa which is very slick.  My issue is that I want the top-most node to be "frozen".  So, you can't drag and drop the top-most node and all it's child nodes.  But, I still want to drop nodes on the top-most nodes and drag and drop any of the child nodes.

I tried to implement it using a disabled node for the top-most node, but then it won't let me drop nodes on it.  And if I leave it unfrozen, then you can move that top-mode node to the other treeview...which works.  But that leaves one treeview empty and the other full, and you can't drop anything on the empty treeview.  (You can duplicate this on your demo treeview by dragging the top-most node, Personal Folders, from one RadTreeView to the other.)

Is there any easy way to implement this?

Mike

2 Answers, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 04 May 2009, 07:18 AM
Hi Mike Philbrick,

You can use the AllowDrag and AllowDrop properties of the RadTreeNode object to control the drag and drop behavior.

Best wishes,
Albert
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Mike Philbrick
Top achievements
Rank 1
answered on 04 May 2009, 12:49 PM
Perfect, thanks!
Tags
TreeView
Asked by
Mike Philbrick
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Mike Philbrick
Top achievements
Rank 1
Share this question
or