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

onblur of radWindow?

1 Answer 79 Views
Window
This is a migrated thread and some comments may be shown as answers.
Stuart Watton
Top achievements
Rank 2
Stuart Watton asked on 22 May 2012, 08:07 AM
Is there any event that fires for a radWindow when it loses the focus? there appears to be the add_activate method which allows me to add a handler when the window receives the focus, but I can find nothing in the documentation for when the window loses the focus.

Would I have to write a function in a settimeout that calls itself and constantly checks if the window is still the active window? seems a little resource hungry!

Stuart

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 23 May 2012, 04:22 PM
Hi Stuart,

 Indeed, there isn't an event that is fired when the RadWindow loses focus. If you need to look for which RadWindow is active you can attach an OnClientActivate handler for all your RadWindows (e.g. in the manager's markup) and store in a global variable the previously active RadWindow then when the handler is fired - check if this is the same one or a different one, execute your logic on the old variable and store the currently active one. Aleternatively you can use jQuery to add a onmouseout handler to the RadWIndow, raise a flag in it and then use a handler to onmousedown - if the click is not inside RadWIndow and onmouseout has been fired then the radWindow has been deactivated.


Greetings,
Marin Bratanov
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
Stuart Watton
Top achievements
Rank 2
Answers by
Marin Bratanov
Telerik team
Share this question
or