Root Node - Disabled - but allow drops?

3 posts, 0 answers
  1. Mike Philbrick
    Mike Philbrick avatar
    7 posts
    Member since:
    Mar 2007

    Posted 01 May 2009 Link to this post

    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. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 04 May 2009 Link to this post

    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.
  3. Mike Philbrick
    Mike Philbrick avatar
    7 posts
    Member since:
    Mar 2007

    Posted 04 May 2009 Link to this post

    Perfect, thanks!
Back to Top