DragDropService HitTarget control name

3 posts, 1 answers
  1. Johan Feijen
    Johan Feijen avatar
    2 posts
    Member since:
    Sep 2018

    Posted 02 Oct 2018 Link to this post

    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. Answer
    Dimitar
    Admin
    Dimitar avatar
    2839 posts

    Posted 02 Oct 2018 Link to this post

    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.
  3. Johan Feijen
    Johan Feijen avatar
    2 posts
    Member since:
    Sep 2018

    Posted 03 Oct 2018 in reply to Dimitar Link to this post

    Hi Dimitar,

     

    Thnx for the answer.

    It was just what I was searching for.

Back to Top