Suggestion for implementing close on esc button

2 posts, 0 answers
  1. Suraj
    Suraj avatar
    12 posts
    Member since:
    Oct 2011

    Posted 03 Dec 2011 Link to this post


    I have a radwindowmanager in masterpage which contains the several windows & confirm template.

    Now I want to implement the close on Esc button functionality  for confirm template only & not for other windows.

    Is there any way other than taking multiple radwindowmanager as everytime I call radopen/radconfirm method ,I will have to call it on that particular radwindowmanager instance only.

    Suraj Patil.
  2. Marin Bratanov
    Marin Bratanov avatar
    5243 posts

    Posted 06 Dec 2011 Link to this post

    Hi Suraj,

    The predefined dialogs (RadAlert, RadConfirm, RadPrompt) do not offer their own shortcut keys like the regular RadWIndows do, because they are very dynamic and multiple instances from the same template could be called in the same time.

    What you can do is one of the following options:

    1) use a regular RadWindow to show the alert infocmation (by setting proper behavior,s size and mimicking the alert's layout in the ContentTemplate - you could, for example, copy the markup from the AlertTemplate). Then for this RadWindow you could declare a shortcut key that will close it (as explained here and here). You may also find useful this article on opening it from the server if this is where you obtain the message.

    2) as you guessed - you can use a separate RadWindowManager and use its CloseAll command - this will also close the alerts from it without interfering with the windows from the main RadWindowManager.

    All the best,
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Back to Top