DragDropManager migration and access to destination element problem

2 posts, 0 answers
  1. Krzysztof
    Krzysztof avatar
    3 posts
    Member since:
    Mar 2014

    Posted 14 Mar 2014 Link to this post


    I'm migrate RadDragAndDropManager to new DragDropManager and i have a problem with access to destination element.

    When i using RadDragAndDropManager i check in DragQuery if destination element (RadTreeViewItem) contains dragged item and change DragDropQueryEventArgs.QueryResult.

    How can i replace DragDropQueryEventArgs.Options.Destination in new DragDropManager? Or tell me how to implement condition on destination element using new DragDropManager.

    Thanks in advance,
  2. Kalin
    Kalin avatar
    1191 posts

    Posted 18 Mar 2014 Link to this post

    Hi Krzysztof,

    In order to achieve the desired scenario you will need to handle the DragOver of the target element where you can check the Item is present. And if you need to prevent the drop if the item is present you will need to set the e.Effects to DragDropEffects.None and to handle the GiveFeedback method of the first element. Inside of the handler you would need to check the e.Effects are none in order to set the cursor to Cursors.None. For your convenience I have prepared a sample project which demonstrates the exact approach with two ListBoxes.

    Hope this helps. If you have any further questions let us know.


    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
Back to Top