Getting Cancel events

4 posts, 1 answers
  1. Jens
    Jens avatar
    27 posts
    Member since:
    Mar 2009

    Posted 09 Sep 2009 Link to this post


    I'd like to get an event whenever the user cancels a dragdrop operation (e.g. presses the escape key or just releases the mouse button). It seems like DragStatus.DragCancel is the status ... but I never get it from any event handler!?

    I'm using the internal build 2009_2_904

    Thank you
  2. Answer
    Valentin.Stoychev avatar
    2198 posts

    Posted 09 Sep 2009 Link to this post

    Hello Jens,

    You should handle the DragInfo event - it is thrown when the user cancels the drag/drop operation.

    Best wishes,
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. Alejandro
    Alejandro avatar
    1 posts
    Member since:
    May 2011

    Posted 12 Jul 2011 Link to this post

    Hi, I need to catch the escape key event, or the "cancellation" event raised by pressing the escape key. The problem is that when I press escape, the DropInfo event is fired and and the DragStatus is DropImpossible, not DropCancel. That status is set when I drag over a not allowed element, so I can't distinguish when the event is caused by the escape key or by anything else.

    1.How could I handle it?
    2.Can I disable the escape key?

    Thanks in advance.
  4. Tsvyatko
    Tsvyatko avatar
    863 posts

    Posted 12 Jul 2011 Link to this post

    Hi Alejandro,

    You can get whether the drag is being cancelled by checking for DragCancel status in DragInfo handler.
    About the esc key - unfortunately the is no option to disable this behavior.

    Kind regards,
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top