Drag and drop in treeview

2 posts, 1 answers
  1. Stephen
    Stephen avatar
    4 posts
    Member since:
    Jun 2012

    Posted 04 Jul 2012 Link to this post


    I need to implement drag and drop on a treeview in such a way that it should allow drag and drop only between same level of nodes.

    Stephen Lewis
  2. Answer
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 04 Jul 2012 Link to this post

    Hi Stephen,

    Here is the sample code which I tried based on your scenario.

    protected void RadTreeView1_NodeDrop(object sender, Telerik.Web.UI.RadTreeNodeDragDropEventArgs e)
        RadTreeNode sourceNode = e.SourceDragNode;
        RadTreeNode destNode = e.DestDragNode;
        RadTreeViewDropPosition dropPosition = e.DropPosition;
        if (sourceNode.Level == destNode.Level+1)

    Hope this helps.

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top