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

Getting Cancel events

3 Answers 90 Views
DragAndDrop
This is a migrated thread and some comments may be shown as answers.
Jens
Top achievements
Rank 1
Jens asked on 09 Sep 2009, 02:37 PM
Hi,

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

3 Answers, 1 is accepted

Sort by
0
Accepted
Valentin.Stoychev
Telerik team
answered on 09 Sep 2009, 02:48 PM
Hello Jens,

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

Best wishes,
Valentin.Stoychev
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.
0
Alejandro
Top achievements
Rank 1
answered on 12 Jul 2011, 09:46 AM
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.
0
Tsvyatko
Telerik team
answered on 12 Jul 2011, 02:44 PM
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,
Tsvyatko
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!

Tags
DragAndDrop
Asked by
Jens
Top achievements
Rank 1
Answers by
Valentin.Stoychev
Telerik team
Alejandro
Top achievements
Rank 1
Tsvyatko
Telerik team
Share this question
or