Drag and drop beetween rad tree view in on way

3 posts, 0 answers
  1. Kev
    Kev avatar
    3 posts
    Member since:
    Jan 2016

    Posted 16 Feb Link to this post

    Hi,

    It is possible to drag and drop nodes from one radtreeview to other but no having the ability to do the reverse.  furthermore i want to have the possibility to drag and drop between nodes just in the other radtreeview.

     

    Example : RadTreeView1 -> just possibility to drag and drop in Radtreeview2

     

        

     

    but not being able to do the reverse
    but not being able to do the reverse
    but not being able to do the reverse
  2. Kev
    Kev avatar
    3 posts
    Member since:
    Jan 2016

    Posted 16 Feb in reply to Kev Link to this post

    And RadTreeview2 -> Just possibility to drap and drop between her nodes between them

     

    Thanks a lot

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 19 Feb Link to this post

    Hello Kev,

    Yes, you can achieve the desired functionality. Please refer to the following online demo, where the basics of the drag&drop between TreeViews and other elements is demonstrated.

    http://demos.telerik.com/aspnet-ajax/treeview/examples/functionality/draganddropnodes/defaultcs.aspx

    Regarding the need to disable the drag from the RadTreeView2 to RadTreeView1 - you can use the onNodeDropping client-side event. Then in you can get the ID of the source TreeView, using the sender.get_id(). and the destination, using dest.get_treeView().get_id(). If the attempt of draging is TreeView2->TreeView1 you can cancel the event, using the eventArguments:  args.set_cancel(true);

    As for the Drag&Drop between nodes - you can use the property EnableDragAndDropBetweenNodes regarding the desired behavior for each TreeView.

    Hope this information helps.

    Regards,
    Nencho
    Telerik
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top