I've a custom validator that showing a rad alert using window manager.
the problem is the custom validator is fired twice some times so it make two rad alert.
how can i detect if the rad window is already opened or closed ?
when i use rad window i can do that by using this method isClosed()
4 Answers, 1 is accepted
One suggestion is that you can set a variable in the OnClientClose function of RadWindowManager and show RadAlert based on that variable. Following is the sample code.
Hope this helps.
using flag is good workaround, i thought there is a method like IsClosed() for rad window.
thanks again for helping.
the provided link really helped me because in my case i need to prevent the custom validator to fire twice.
in princy case the flag will change its status if we close the window but if it is still display then we would get more than one window displayed.
but the other link can give me a reference to the displayed window as mentioned below
var oAlert = radalert(text, oWidth, oHeight, oTitle, callbackFn, imgUrl);
This method also returns a reference to the RadAlert object (which is essentially a RadWindow), so you can use the
RadWindow's client-side API on it to further change it (titlebar icon, behaviors, etc.)
so from oAlert i can use IsClosed() function to check if the window still display or not
thanks very much guys for helping, i really appreciate it.