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

Which framework to use? (RadD&DManager or D&DManager)

5 Answers 89 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Aksel
Top achievements
Rank 1
Aksel asked on 20 Dec 2012, 08:24 AM
Hi, I'm trying to drag XML elements from one RadTreeView (call it templateView) to another RadTreeView (contentView), and reordering of the XML elements in the contentView.
A drag operation from the templateView to the contentView should only be a copy operation; the templateView should never change its contents.

Looking through the documentation it appears that RadDragAndDropManager is not supported anymore, but if I look through the samples, for example the TreeView Drag And Drop sample in the WPF Control Example app (and in the examples included in the source), and even in the documentation (http://www.telerik.com/help/wpf/radtreeview-how-to-implement-drag-and-drop-between-treeview-and-other-controls.html), it seems the only samples are RadDragAndDropManager. And the DragAndDropManager samples I found are lacking some of the defining features of RadDragAndDropManager such as the insertion marker (above, inside and below).

So which of these frameworks should I go for? The supported one, without samples, or the unsupported one, with samples?

5 Answers, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 20 Dec 2012, 12:17 PM
Hello Aksel,

We are sorry for the confusion. We are constantly working on improving the examples and documentation for the DraDropManager. 

To the point, you can see a good example of a drag drop implementation here(the same example is available in your local copy of our demos).

The only thing you have to do is to change is:

private void OnDragDropCompleted(object sender, DragDropCompletedEventArgs e)
{
    if (e.Effects != DragDropEffects.None && this.isTreeSource)
    {
        var data = DragDropPayloadManager.GetDataFromObject(e.Data, "DraggedData");
 
        this.sourceItems.Remove(data);
    }
}

The method should not remove the dragged data, and that takes care of the Drag copy logic.

Let me know how it goes!  All the best,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Aksel
Top achievements
Rank 1
answered on 20 Dec 2012, 01:12 PM
Hm.. I got the actual drag and drop functionality to work.
But is it possible to get back the drop position line, showing where the item will be inserted?
0
Nick
Telerik team
answered on 20 Dec 2012, 01:22 PM
Hello,

Unfortunately, this is a limitation of using this approach. 

We are sorry for any inconvenience caused! 

Greetings,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

0
Aksel
Top achievements
Rank 1
answered on 20 Dec 2012, 01:33 PM
Yeah... That's why I was asking which framework to use.
To me it seems like the RadDragAndDropManager has more features and is generally better than the new one. What is the reasoning for deprecating a framework when the replacement framework still lacks lots of features?

Anyway, is there a workaround? Can I add this line manually somehow?
0
Accepted
Nick
Telerik team
answered on 20 Dec 2012, 01:40 PM
Hello Aksel,

The DragDropManager was introduced because some major flaws in the RadDragAndDropManager. Many of them related to drag and drop between different applications. Drag and Drop in nested scenarios etc. 

As to the DropPreviewLine, it is an internal feature of the TreeView, not the RadDragAndDropManager. The TreeView internal Drag and Drop logic still depends on the RadDragAndDropManager, so disabling its internal drag drop logic disables the line as well. 

At the moment the only way to use the Drop line is to use the RadDragAndDropManager. 

As to the difference in the features of the both Drag Drop mechanisms, at the moment the one gap that exist between them is the lack of the DragArrowCue in the new manager.

Again we are sorry for the inconvenience caused, and are going to do our best to avoid such cases in the future! 

 

All the best,
Nik
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
DragAndDrop
Asked by
Aksel
Top achievements
Rank 1
Answers by
Nick
Telerik team
Aksel
Top achievements
Rank 1
Share this question
or