Drag & Drop betrween treeview

5 posts, 0 answers
  1. Gunasekaran
    Gunasekaran avatar
    3 posts
    Member since:
    Jan 2014

    Posted 29 Jan 2014 Link to this post

     I am developing an application in which I require drag drop between two tree which a condition that
    1. When child node is dragged , it needs to check if the Parent Node for that child is present in the Target Treeview,
        if (present)
         // add the child within that parent node
        else
         // Add the parent node and then the child node.
  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 03 Feb 2014 Link to this post

    Hello Gunasekaran,

    To achieve your requirement you could use our DragDropManager and the default drag and drop behavior of the RadTreeView. To enable the default behavior you will need to set the IsDragDropEnabled property of the RadTreeView to true. You could try handling the OnDragOver and the OnDrop events to accomplish your demand.
    DragDropManager.AddDragOverHandler(this.RightTree, OnDragOver, true);
    DragDropManager.AddDropHandler(this.RightTree, OnDrop, true);

    If you have difficulties in the implementation of this behavior, please let us know.

    Regards,
    Martin Ivanov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  3. UI for WPF is Visual Studio 2017 Ready
  4. Gunasekaran
    Gunasekaran avatar
    3 posts
    Member since:
    Jan 2014

    Posted 03 Feb 2014 in reply to Martin Link to this post

    hi Martin Ivanov ,

    Thanks for your post , can you please provide a sample solution for it
  5. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 04 Feb 2014 Link to this post

    Hi Gunasekaran,

    I attached a sample project to demonstrate my suggestion. I hope it would be a good starting point for you. 

    Regards,
    Martin Ivanov
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  6. Gunasekaran
    Gunasekaran avatar
    3 posts
    Member since:
    Jan 2014

    Posted 04 Feb 2014 in reply to Martin Link to this post

    hi Martin Ivanov,

    Thank you so much for your quick responses.
    This solution works exactly for my requirement ... Once again thanks for the solution
Back to Top
UI for WPF is Visual Studio 2017 Ready