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

Destoy on close not working

2 Answers 48 Views
Window
This is a migrated thread and some comments may be shown as answers.
A K
Top achievements
Rank 1
A K asked on 25 Oct 2010, 06:26 PM
I have rad windo manager on Home page defined like this:

<

 

telerik:RadWindowManager ID="radWindowManager" Style="z-index: 8001;"

 

 

runat="server" Skin="Vista" OnClientClose="OnClientClose">

 

 

<Windows>

 

 

<telerik:RadWindow ID="radWINModalPostLogin" runat="server" ReloadOnShow="True" DestroyOnClose="true" Behaviors="None"

 

 

Left="" VisibleTitlebar="False" VisibleOnPageLoad="false" Style="display: none;" Top="" Modal="True" KeepInScreenBounds="True" >

 

 

</telerik:RadWindow>

 

 

</Windows>

 

 

</telerik:RadWindowManager>

In the btton which opens Radwindow is Ajaxified. It's kind of wizard pages. But when user cancel out at any stage and clicks on the wizard button again it shows the window where user canclled out and whe I close that window after that start up window is shown. I don't understand what's happening. I have set DestroyONClose to ture.


 

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 26 Oct 2010, 08:27 AM
Hello,


Try setting the DestroyOnClose to True for RadWindowManager and see whether it helps.

How are you opening the RadWindow? If you are opening new window (means not the radWINModalPostLogin window), then the setting for the particular window wont take effect.



-Shinu.
0
Georgi Tunev
Telerik team
answered on 26 Oct 2010, 12:31 PM
Hi A K,

Most probably you have more than 1 RadWindowManager on the page. In such case, you need to take into consideration the following:

   1. All RadWindowManager's functions (radopen, radalert, radconfirm, radprompt, GetRadWindowManager, etc) are always using the first rendered RadWindowManager on the page.
   2. Every RadWindowManager "knows" only the RadWindows that are declared in its Windows collection.

This means that if you have a RadWindow2 declared in RadWindowManager2, and you use something like radopen(myUrl, "RadWindow2");, radopen will use RadWindowManager1 and will open a new RadWindow with the settings taken from RadWindowManager1. To avoid that problem, when you have multiple managers on a page, you need to get a reference to the correct RadWindowManager first and then call its methods.
e.g.
var manager = $find("<%= RadWindowManager2.ClientID %>");
manager.open(myUrl, "RadWindow2");


All the best,
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
Tags
Window
Asked by
A K
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Georgi Tunev
Telerik team
Share this question
or