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

Closing alerts with the escape key

4 Answers 50 Views
Window
This is a migrated thread and some comments may be shown as answers.
Geert
Top achievements
Rank 1
Geert asked on 10 Nov 2011, 10:22 AM
We are using the RadWindow.Alert() method to show messages to the user. This works great, except that the window does not following the windows behavior. For example, when I have a message box with 2 choices (OK/Cancel), I can close it with the escape key (results in cancel). However, if I only show the OK button, I must either press enter or click OK, but escape doesn't work (in Windows, it does close the message box).

I took a look at the code in reflection, and the actual window is created inside of the ConfigureModal method, but I cannot get to the instance to manually subscribe the escape key to close the window. So, what's the easiest way to allow users to close the message box in OK state with the escape key?

Thanks in advance!

4 Answers, 1 is accepted

Sort by
0
Rob
Top achievements
Rank 1
answered on 28 Nov 2011, 04:01 PM
I'm getting complaints from users about the same issue, this is really bad UX practice. Please fix.
0
Boyan
Telerik team
answered on 01 Dec 2011, 02:52 PM
Hi guys,

We agree that this behavior is not so user friendly. Currently pressing Escape is linked to the Cancel button in the template of the control and that is why it is not working for Alert window. I have entered your request in our PITS, you can follow its progress and vote for it here.

As a workaround you can edit the template of the Alert window and add the functionality. I have attached a sample project where I have added a dummy cancel button with Visibility=Collapsed that handles the Escape key so the RadAlert is closing. Hope this suits your scenario.

Let me know if you have further questions.

Best wishes,
Boyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Rob
Top achievements
Rank 1
answered on 01 Dec 2011, 07:18 PM
Thanks for adding this to PITS and listening to your customers. That is good practice ;)

Kind regards,
Rob Houweling
0
Boyan
Telerik team
answered on 13 Dec 2011, 02:57 PM
Hi Guys,

This feature was implemented and will be available in the next internal build and in the Service pack. Thank you for tour patience.

All the best,
Boyan
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Window
Asked by
Geert
Top achievements
Rank 1
Answers by
Rob
Top achievements
Rank 1
Boyan
Telerik team
Share this question
or