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

6 posts, 1 answers
  1. Aksel
    Aksel avatar
    11 posts
    Member since:
    Jun 2012

    Posted 20 Dec 2012 Link to this post

    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?
  2. Nick
    Admin
    Nick avatar
    593 posts

    Posted 20 Dec 2012 Link to this post

    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.

  3. UI for WPF is Visual Studio 2017 Ready
  4. Aksel
    Aksel avatar
    11 posts
    Member since:
    Jun 2012

    Posted 20 Dec 2012 Link to this post

    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?
  5. Nick
    Admin
    Nick avatar
    593 posts

    Posted 20 Dec 2012 Link to this post

    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.

  6. Aksel
    Aksel avatar
    11 posts
    Member since:
    Jun 2012

    Posted 20 Dec 2012 Link to this post

    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?
  7. Answer
    Nick
    Admin
    Nick avatar
    593 posts

    Posted 20 Dec 2012 Link to this post

    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.

Back to Top
UI for WPF is Visual Studio 2017 Ready