Drag drop operation between ListBox and TreeView - migration from RadDragAndDropManager

5 posts, 1 answers
  1. Marcin
    Marcin avatar
    31 posts
    Member since:
    Jul 2013

    Posted 05 Mar 2014 Link to this post

    Hi,

    I'm migrating our software from RadDragAndDropManager to DragDropManager.

    I followed the tutorial described in: http://www.telerik.com/help/silverlight/radtreeview-how-to-implement-drag-and-drop-between-treeview-and-listbox.html.
    I encounter a problem with migrating two features, that seems to be out-of-box in previous version:

    1. Drop position indicator befor/after current item (I got only info in DragCue) - just like during D&D operation in RadTreeView.
    2. Expanding nodes while keeping cursor above an item (I think, it can be implemented by adding some timers, and so on - but maybe there is trick to activate this feature).

    Best regards
    Marcin
  2. Boris
    Admin
    Boris avatar
    276 posts

    Posted 10 Mar 2014 Link to this post

    Hello Marcin,

    I attached the SDK sample project described in the RadTreeView documentation. You can also download this example from the link at the bottom of the article. The features you described work fine in the sample project. But if you are having any issues could you please modify it and send it back to us ?

    Please let us know if this helps.

    Regards,
    Boris Penev
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  3. DevCraft banner
  4. Marcin
    Marcin avatar
    31 posts
    Member since:
    Jul 2013

    Posted 10 Mar 2014 in reply to Boris Link to this post

    Hello Boris,

    It just the article and example I used to migrate out controls. 

    The features mention in points 1. and 2. are missing while dragging from ListBox and trying to drop on the Tree View (I wasn't clear enough in earlier post).

    Is it possible to be done somehow 'out-of-box'. As we hadn't migrated our code for now, we are still using 2013Q1 Telerik controls. Maybe this is done in latest release? We will be ready for upgrade as soon as we rewrite all usage of RadDragAndDropManager.

    Best regards
    Marcin Danek
  5. Answer
    Boris
    Admin
    Boris avatar
    276 posts

    Posted 13 Mar 2014 Link to this post

    Hello Marcin,

    The RadTreeView uses a TreeViewDragDropOptions object to wrap all drag-drop related data during a drag operation. This is why if you create such an element in the DragInitialize handler in the ListBox DragDropBehavior implementation, as soon as you drag a ListBoxItem over the RadTreeView, the TreeViewDragDropOptions will trigger the TreeView's auto-expand, auto-scroll-during-drag and drag-over-visualization logic.

    I attached a sample solution demonstrating this approach. Please have a look at it and let us know if it helps.

    Regards,
    Boris Penev
    Telerik
     

    DevCraft Q1'14 is here! Watch the online conference to see how this release solves your top-5 .NET challenges. Watch on demand now.

     
  6. Marcin
    Marcin avatar
    31 posts
    Member since:
    Jul 2013

    Posted 19 Mar 2014 in reply to Boris Link to this post

    Yes - it works now!

    Best regards!

    Marcin Danek
Back to Top
DevCraft banner