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

DragDropService HitTarget control name

2 Answers 101 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Johan Feijen
Top achievements
Rank 1
Johan Feijen asked on 02 Oct 2018, 10:02 AM

Hello,

Does anybody know how to get the name of the control (Listview) when using the DragDropService >> PreviewDragOver >> e.HitTarget ?

I have got multiple listviews on a form and depending on the source the DragItem may not be dropped.

Grtz Patrick Vossen

 

2 Answers, 1 is accepted

Sort by
0
Accepted
Dimitar
Telerik team
answered on 02 Oct 2018, 01:16 PM
Hi Johan,

You can get the control from any element using the ElementTree.Control method. Here is an example:
Console.WriteLine(item.ElementTree.Control.Name);

I hope this will be useful. Let me know if you have additional questions.

Regards,
Dimitar
Progress Telerik
Get quickly onboard and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Johan Feijen
Top achievements
Rank 1
answered on 03 Oct 2018, 11:30 AM

Hi Dimitar,

 

Thnx for the answer.

It was just what I was searching for.

Tags
ListView
Asked by
Johan Feijen
Top achievements
Rank 1
Answers by
Dimitar
Telerik team
Johan Feijen
Top achievements
Rank 1
Share this question
or