RadWindowManager's DestroyOnClose="True" not working?

dave

We have recently updated a web application which was using Telerik.Web.UI version 2008.3.1314.35 to and updated the to version 2010.3.1317.35.

The application sets the RadWindowManager's DestroyOnClose="True" and opens a window using server side code. Before I updated when window's close button is clicked, the window closes and the RadWindowManager to deletes the window.
After update to version 2010.3.1317.35 the window closes but is not deleted and when the page posts back the window reappears.

Martin

I have the same problem - I create windows on the server side and have DestroyOnClose='true". I found that the windows does get deleted on the client side, but that deletion doesn 't get persisted to the server side. So I set "EnableViewState="false" and it changes the behavior 9in that the window does now disappear. But it also disappears if I create a SECOND window.
So my scenario is this:

I create a Window - then I minimize it. Then, on the server side, I create a new Window so now I have two open, but with EnableViewState set to false, the first window disappears. It appears that I need some tracking and commit function on the client side to post back the updated Windows array on postback.

Martin

When I wrote that post last night, I mistakenly read the date Jan 24, 2011 as 2012 and assumed it was a recent post. Otherwise I would have started a new thread.

But my problem remains. I have a RadWindowManager with DestroyOnClose='true' but on every postback, even after closing the window theRadWindowManager's Windows collection still contains the window. I do not have VisibleOnPageLoad set. Instead, on every load, I run the following javascript.

functionopenPromoteWindows(RadWindowManagerId) {

varoManager = $find(RadWindowManagerId);

varoWindows = oManager.GetWindows();

for(i = 0; i < oWindows.length; i++) {

varoWindow = oWindows[i];

oWindow.show();

oWindow.Minimize();

oWindow.get_popupElement().style.zIndex = 10000 + i;

}

}

This successfully opens all the windows minimized inside a taskbar. The problem is that since closded windows are still in the Windows Collection, they reappear.

I did write some code called "OnClientClose that does successfully delete the window from the windows collection on the client side, but it doesn't persist. That code is below:

functionrwmPromote_Close(sender, eventargs) {

varrwm = $find(window['rwmPromoteId']);

varoWindows = rwm.GetWindows();

vari;

for(i = 0; i < oWindows.length; i++) {

varoWindow = oWindows[i];

if(oWindow == sender)

break;

}

if(i < oWindows.length) {

rwm._windows.splice(i, 1);

}

}

This code was added in desperation to try and get the information persisted to the server side. I tried setting EnableViewState to false, but as expected that makes it forget about all Windows in the Windows collection except for ones added during that postback, which means it does forget about closed windows but also forgets about minimized windows.

I am about to add a HiddenField which will contain the ClientIDs of all Windows and then I will use that server side to deduce which windows, if any, were closed. While I am hopeful this will work, I am sure it's not the way it is supposed to work.

Suggestions welcomed!!

Martin

I have implemented the HiddenField idea I mentioned in my last post and it works. But it should be possible to get the RawWindowManager to be updated automatically without me having to do silly things, so I am still looking for the correct answer.