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

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

1 Answer 105 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Kalle
Top achievements
Rank 1
Kalle asked on 30 May 2013, 09:19 AM
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

1 Answer, 1 is accepted

Sort by
0
Yoan
Telerik team
answered on 03 Jun 2013, 03:36 PM
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.

Tags
DragAndDrop
Asked by
Kalle
Top achievements
Rank 1
Answers by
Yoan
Telerik team
Share this question
or