After close radwindows, they disappeared from the window, however when I used the code as following. var allWindows = GetRadWindowManager().GetWindows();
allwindows still includes the closed radwindow. I add the ownd.close(), it does not work, how can I get the closed window out of the collection list?
Thanks again.
5 Answers, 1 is accepted
Hi Yao,
Set the DestroyOnClose property of RadWindow to True. If property is set to true, the window will be disposed and made inaccessible once it is closed.
-Shinu.
Set DestroyOnClose to true - this would destroy the RadWindow object once the window is closed (i.e. it will not remain hidden on the page).
Sincerely yours,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thanks a lot for your help.
I added the code as following.
var pos = GetFirstAvailablePos();
oWnd = radopen(
"http://www.google.com/", null);
oWnd.SetTitle(
"Widget" +titleNum);
oWnd.SetSize(200, 200);
oWnd.DestroyOnClose =
true;
oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Resize);
oWnd.add_close(OnClientClose);
oWnd.moveTo(pos.left, pos.top);
function OnClientClose(oWnd, eventArgs) {
oWnd.close();
oWnd.DestroyOnClose =
true;
}
Then I used the code as following, the closed window is still in the allwindows list, please help me to find out why, thanks again.
var allWindows = GetRadWindowManager().GetWindows();
for (var i = 0; i < allWindows.length; i++) {
......
}
e.g.
<telerik:radwindowmanager id=RadWindowManager1 runat=server DestroyOnClose=true ..... />
Greetings,
Georgi Tunev
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Have a good weekend,
Yao