onblur of radWindow?

2 posts, 0 answers
  1. Stuart Watton
    Stuart Watton avatar
    18 posts
    Member since:
    Sep 2009

    Posted 22 May 2012 Link to this post

    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
  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    5709 posts

    Posted 23 May 2012 Link to this post

    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.
Back to Top