Closing alerts with the escape key

5 posts, 0 answers
  1. Geert
    Geert avatar
    9 posts
    Member since:
    May 2011

    Posted 10 Nov 2011 Link to this post

    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!
  2. Rob
    Rob avatar
    6 posts
    Member since:
    Oct 2010

    Posted 28 Nov 2011 Link to this post

    I'm getting complaints from users about the same issue, this is really bad UX practice. Please fix.
  3. DevCraft banner
  4. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 01 Dec 2011 Link to this post

    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 >>

  5. Rob
    Rob avatar
    6 posts
    Member since:
    Oct 2010

    Posted 01 Dec 2011 Link to this post

    Thanks for adding this to PITS and listening to your customers. That is good practice ;)

    Kind regards,
    Rob Houweling
  6. Boyan
    Admin
    Boyan avatar
    758 posts

    Posted 13 Dec 2011 Link to this post

    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 >>

Back to Top
DevCraft banner