prevent drag and drop within parent node

2 posts, 0 answers
  1. Guna
    Guna avatar
    7 posts
    Member since:
    Feb 2011

    Posted 12 Apr 2011 Link to this post

    hi telerik team,
                     i am using radtreeview which is very useful for me in my current project, but, i need a help to accomplish it successfully ....
    i have populated the tree view from a dataset. there will be more number of parent nodes and within each parent node, more than one child nodes will be there. Now i have to restrict the user to drag and drop the child nodes within the parent node itself. (Meaning : User should not interchange a child node from one parent node to another parent node. they should interchange or arrange a child node within its parent node itself). i dont have any idea about doing this in the tree view, so pls help me as soon as possible.

  2. Sonya L
    Sonya L avatar
    36 posts
    Member since:
    Dec 2009

    Posted 12 Apr 2011 Link to this post

    Guna ,
    You could try handling the DragEnding event of the treeview, and compare the parent of e.Node and e.TargetNode.  If they are different, you could set e.Cancel =  true to cancel the drag-drop.

Back to Top