Drag and Drop between Nodes

3 posts, 1 answers
  1. Alan
    Alan avatar
    16 posts
    Member since:
    May 2005

    Posted 18 Nov 2008 Link to this post

    Hello

    I am finding some difficulty with the drag and drop of nodes in the treeview.

    I got a treeview with many number of nodes in different levels and I have enabled the properties for drag and drop in the treeview. To restrict some nodes order(position) not to change in the treeview, for those nodes I have set the allowdrop and allowdrag property to false. The problem is eventhough I set the property to false, it allows to drop in between the nodes so I could not make some nodes position to be same(static) always. Whereas this works for the older version of radControls(before prometheus).

    Could you help me in this?

    Thank you.
  2. Answer
    Simon
    Admin
    Simon avatar
    2281 posts

    Posted 20 Nov 2008 Link to this post

    Hello Mark Leeds,

    Setting AllowDrop to false of a Node will prevent other Nodes to be dropped onto it. Dropping between Nodes is not controlled in such a way.

    However, you can hook to the OnClientNodeDropping event of the TreeView and depending on the drop position, the destination Node and its AllowDrop property you can cancel the event. In this way, you can achieve the desired functionality.

    Please see these help articles for more information:
    Kind regards,
    Simon
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
  3. Alan
    Alan avatar
    16 posts
    Member since:
    May 2005

    Posted 21 Nov 2008 Link to this post

    Hello Simon

    It works great..

    Thank you
Back to Top