IsVirtualizing and Drag / Drop

3 posts, 0 answers
  1. Keith
    Keith avatar
    88 posts
    Member since:
    May 2007

    Posted 10 Jun 2014 Link to this post

    Hi

    I have a requirement to collapse the parent of the node(s) being dragged. This is because some of the parent nodes contain lots of children and it is taking a long time to drag past all the children to the new destination.

    Unfortunately because of the number of nodes in this tree, I've enabled IsVirtualizing but this obviously discards the children when the parent is collapsed and the drag operation never completes. I'm using the new drag drop execution mode.

    Is there any way to achieve this?

    Thanks
    Keith
  2. Martin
    Admin
    Martin avatar
    1101 posts

    Posted 13 Jun 2014 Link to this post

    Hi Keith,

    The RadTreeView doesn't support this scenario out of the box, but you can achieve your requirement with custom implementation. As in this case the drop functionality doesn't work you can subscribe the tree for the Drop event of the DragDropManager and implement the drop in its handler. 

    For your convenience I prepared a sample project that demonstrates this approach. Keep in mind that the project is not well tested and I cannot guarantee you that it will work in all possible cases. This is why I recommend you to test and modify it in order to fit in your scenario.

    Please give the project a try and let me know if it helps.

    Regards,
    Martin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Keith
    Keith avatar
    88 posts
    Member since:
    May 2007

    Posted 16 Jun 2014 Link to this post

    Hi Martin

    Thanks for the help (and project). I already do a lot of the work on the item via the VM so this wouldn't be a big change to implement as you suggest. I'll give it a try and fingers crossed!

    Regards
    Keith
Back to Top