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

Timers Left Running After Window Closed

3 Answers 61 Views
Window
This is a migrated thread and some comments may be shown as answers.
Andy
Top achievements
Rank 1
Andy asked on 27 Mar 2009, 02:11 PM
I have an 'editor.aspx' page that has some RadEditor controls and an asp:Timer control to perform auto-save.

The editor.aspx page is running inside a RadWindow but when the RadWindow is closed the timer continues running.

Why does this happen? Is there any way to stop the timers, as the Timer control is in 'editor.aspx' but the RadWindow is in the parent aspx page.

3 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 30 Mar 2009, 07:42 AM
Hi Andy,

By default, RadWindow instances are cached to speed up response time after the first time they are shown and will not destroyed on clossing. You can prevent this caching by setting the DestroyOnClose property to True. Try setting the DestryOnClose property to true and see whether it stops the timers when clossing the RadWindow.

ASPX:

<telerik:radwindowmanager id="RadWindowManager1" DestroyOnClose="true" Modal="true" runat="server">   
</telerik:radwindowmanager>  

Thanks,
Princy.

0
Georgi Tunev
Telerik team
answered on 30 Mar 2009, 02:27 PM
Hello Andy,

Indeed, Princy is right. I would just like to add some more info about the DestroyOnClose functionality. When this property is set to true, the window object will be destroyed once it is closed. This means that you will not be able to open that same RadWindow again until the page is reloaded. A new RadWindow with the default settings taken from the RadWindowManager will be opened instead. That is why in scenario like this, I suggest to set all needed properties (size, behavior, etc.) in the RadWindowManager OR as an alternative - to set them by using the client-side API when opening RadWindow.

Regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
Andy
Top achievements
Rank 1
answered on 31 Mar 2009, 09:13 AM
This solution works perfectly for me. Thank you!
Tags
Window
Asked by
Andy
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Georgi Tunev
Telerik team
Andy
Top achievements
Rank 1
Share this question
or