How to: Check the target of Drag and Drop (OnDragCompleted)

2 posts, 0 answers
  1. Kalle
    Kalle avatar
    26 posts
    Member since:
    Feb 2013

    Posted 30 May 2013 Link to this post

    Hi,

    I have RadListBoxes and user can drag and drop stuff between them but how can I check what the drop target is when OnDragCompleted is fired?

    The problem is that I want to remove data from database if user drags stuff outside the listbox but not remove data from database if user drags stuff to other listbox. I can't seem to find out which drag and drop has been done at the moment...

    Now I can get the source of drag operation from sender but how can I get the target for the drop?

    Drag and drop target

    Br,

    Kalle
  2. Yoan
    Admin
    Yoan avatar
    1068 posts

    Posted 03 Jun 2013 Link to this post

    Hi Kalle,

    Generally, this can be achieved by modifying the DragDropEffects of the current drag operation by using the DragOver event. 

    You can achieve the functionality in your question by setting the effects of the current drag operation to None.

    The usage of the drag effects can be seen here

    Regards,
    Yoan
    Telerik

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top