Tree Drag and Drop Multiple Items

0 Answers 49 Views
DragAndDrop TreeView
Blaine
Top achievements
Rank 1
Blaine asked on 02 Jan 2025, 10:31 PM

I've been dealing with an issue for awhile now where dragging and dropping multiple tree items is kind of difficult.  If I select several items and then try to drag them somewhere else, it only works if I start the drag with my mouse over the last item selected.  If I try to start the drag with my mouse over any other selected items then the tree selection changed event fires and wipes out all of the selected items except for the one I'm currently over.

Holding the shift key during all of this also makes it work as expected.  But both of the ways that work aren't very obvious to users.  Is there any other way to keep all of the selected items when dragging regardless of what item the drag starts over?

 

Martin Ivanov
Telerik team
commented on 07 Jan 2025, 12:54 PM

I've tested this in the TreeView Drag and Drop demo, but couldn't recreate the problem. Can you share some sample code and record a video showing the exact steps that reproduce the issue?
Blaine
Top achievements
Rank 1
commented on 28 Jan 2025, 10:07 PM

Do you have a demo that shows tree drag and drop with multi-select?  The one I have installed only has single selection, so I can't tell if it's something present outside of my application.

My application doesn't seem to be doing anything strange with selection on right-click, but I can take the sample application and add multi-select support to see if the same issue occurs.

Martin Ivanov
Telerik team
commented on 30 Jan 2025, 07:08 AM

The TreeView Drag and Drop demo has single selection enabled by default, but you can change this by setting the SelectionMode property of the RadTreeView in the example to Multiple (or Extended). I've double checked this and the drag/drop in the demo works properly with the multiple selection enabled.

You can test this also in the following example: https://github.com/telerik/xaml-sdk/tree/master/TreeView/DragDropBetweenTreeViews

No answers yet. Maybe you can help?

Tags
DragAndDrop TreeView
Asked by
Blaine
Top achievements
Rank 1
Share this question
or