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

Suggestion for implementing close on esc button

1 Answer 32 Views
Window
This is a migrated thread and some comments may be shown as answers.
Suraj
Top achievements
Rank 1
Suraj asked on 03 Dec 2011, 08:24 AM
Hi,

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.

Regards,
Suraj Patil.

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 06 Dec 2011, 05:02 PM
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,
Marin
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
Tags
Window
Asked by
Suraj
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or