How to do the basic setup for RadTreeView using drag and drop with context menu?

2 posts, 0 answers
  1. Ritika Gupta
    Ritika Gupta avatar
    12 posts
    Member since:
    Jan 2010

    Posted 20 Jan 2010 Link to this post


    I need to set up RadTreeView for ASP.NET AJAX ( drag and drop with context menu).
    Any help - documentation, codes etc on how to go about this is appreciated.

    Many Thanks,
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 20 Jan 2010 Link to this post

    Hello Ritika,

    In order to use the drag and drop functionality in treeview, you can simply set the RadTreeView with EnableDragAndDrop="True" and you will be able to drag and drop TreeNodes.

    Also RadTreeView supports its own context menus- Demo.

    Now, if you want to move the nodes using the contextmenu (ie, right-clicking a node and selecting 'Move node' and then right clicking another node and selecting 'Drop here'), then one suggestion is,

    In the OnClientContextMenuItemClicked event, remove the node from the source node collection and then add create a new instance of node and then add the node in the dropped node collection (according to menuitm clicked). You can refer the following demo which will help you in adding and removing the nodes.
    Add/Remove/Disable Nodes

    Hopes this suggestion helps,
Back to Top