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

DestroyOnClose = "True" and OnClientClose not work perfectly

3 Answers 345 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rudá Cunha
Top achievements
Rank 2
Rudá Cunha asked on 10 Sep 2010, 04:35 PM
I'm using the example Window / RadWindow And MDI, but I need to set the DestroyOnClose = "True".

When closing the window OnClientClose runs but when I open up another window and closing the OnClientClose to work.

Was using the Q1 and worked perfectly, updated for Q2 2010 and began to make that mistake.

How to solve this?

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 13 Sep 2010, 05:50 AM
Hello Ruda,


When setting DestroyOnClose property of the window to True, it prevents caching after closing the window, and opens a new window next time. So, one suggestion is adding the client event "OnClientClose" from client code as shown in the documentation.
Setting client events by using Javascript


-Shinu.
0
Rudá Cunha
Top achievements
Rank 2
answered on 13 Sep 2010, 01:04 PM
I have not tested, even if m runs itself, the problem must be solved in the RadWindow, it worked before and then stops working!

Good going deeper could figured out where is the problem and solution!

I tested the example by modifying their example code and running! With this worked perfectly.
I copied and set the example and put in my application (and DefaultCS.aspx DefaultCS.aspx.cs).
I removed some things and did not work, so I put back all the HeadTag (<qsf:HeadTag ID="Headtag1" runat="server" />).
It gave some errors so I copied the Common folder and file and QuickStart QuickStart.config. The page ran but did not work!

Ie I even copying the page and copying the things he needs, not work on my web site, but it works in the example!

It has something to do with the web.config or else!

Try the same thing I did, create an application with the same features of the example, place the
DestroyOnClose = "True" and will stop working!


Note: As I said before the old version worked perfeitamete, then something is wrong!
0
Georgi Tunev
Telerik team
answered on 13 Sep 2010, 02:59 PM
Hello Rudá,

The code is working as expected even if DestroyOnClose is set to true (there are no predefined RadWindows and in this demo all windows are created by the manager dynamically), so at this point I am not quite sure what exactly the problem is.
Please open a support ticket and send us a sample project where the problem that you experience can be reproduced and send it to us along with detailed description of the issue so we can investigate further.


Kind regards,
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
Rudá Cunha
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Rudá Cunha
Top achievements
Rank 2
Georgi Tunev
Telerik team
Share this question
or