DestroyOnClose = "True" and OnClientClose not work perfectly

4 posts, 0 answers
  1. Rudá Cunha
    Rudá Cunha avatar
    58 posts
    Member since:
    Mar 2010

    Posted 10 Sep 2010 Link to this post

    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?
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 Sep 2010 Link to this post

    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.
  3. Rudá Cunha
    Rudá Cunha avatar
    58 posts
    Member since:
    Mar 2010

    Posted 13 Sep 2010 Link to this post

    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!
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 13 Sep 2010 Link to this post

    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
Back to Top