This is a migrated thread and some comments may be shown as answers.

IsVirtualizing and Drag / Drop

2 Answers 11 Views
TreeView
This is a migrated thread and some comments may be shown as answers.
Keith
Top achievements
Rank 1
Keith asked on 10 Jun 2014, 02:38 PM
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 Answers, 1 is accepted

Sort by
0
Martin Ivanov
Telerik team
answered on 13 Jun 2014, 03:15 PM
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.
 
0
Keith
Top achievements
Rank 1
answered on 16 Jun 2014, 08:00 AM
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
Tags
TreeView
Asked by
Keith
Top achievements
Rank 1
Answers by
Martin Ivanov
Telerik team
Keith
Top achievements
Rank 1
Share this question
or