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

Identifying the source control in drag and drop

2 Answers 56 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Michael Hassinger
Top achievements
Rank 1
Michael Hassinger asked on 25 Aug 2010, 05:11 AM
I have two ListBoxes that I am allowing a user to drag items from onto a GridView. Depending on which ListBox they are dragging from, I need to perform different operations.

So my question is how do I determine which ListBox control the user is dragging an item from at the time of drop?

2 Answers, 1 is accepted

Sort by
0
Accepted
Tsvyatko
Telerik team
answered on 25 Aug 2010, 11:10 AM
Hello Michael Hassinger,

You could take advantage of the property e.Options.Source which keep track of the source element being dragged (in your case this could be ListBoxItem) and then check which listbox it belongs to. Let me know if you have any questions regarding this scenario.

Regards,
Tsvyatko
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Michael Hassinger
Top achievements
Rank 1
answered on 25 Aug 2010, 05:06 PM
Yes, I am able to get to the parent ListBox control name once I create a ListBoxItem and set it to e.Options.Source.

Thanks!
Tags
DragAndDrop
Asked by
Michael Hassinger
Top achievements
Rank 1
Answers by
Tsvyatko
Telerik team
Michael Hassinger
Top achievements
Rank 1
Share this question
or