closed radwindow still exist in window

6 posts, 0 answers
  1. yao wang
    yao wang avatar
    25 posts
    Member since:
    May 2010

    Posted 12 May 2010 Link to this post

    Thanks for your help, which really help me a lot. I have a new question about closed radwindow.

    After close radwindows, they disappeared from the window, however when I used the code as following. var allWindows = GetRadWindowManager().GetWindows();

    allwindows still includes the closed radwindow. I add the ownd.close(), it does not work, how can I get the closed window out of the collection list?

    Thanks again.
  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 13 May 2010 Link to this post

    Hi Yao,

    Set the DestroyOnClose property of RadWindow to True. If property is set to true, the window will be disposed and made inaccessible once it is closed.

    -Shinu.

  3. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 13 May 2010 Link to this post

    Hello yao wang,

    Set DestroyOnClose to true - this would destroy the RadWindow object once the window is closed (i.e. it will not remain hidden on the page).


    Sincerely yours,
    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.
  4. yao wang
    yao wang avatar
    25 posts
    Member since:
    May 2010

    Posted 13 May 2010 Link to this post

    Hi Shinu and Georgi,

    Thanks a lot for your help.

    I added the code as following.  

    var pos = GetFirstAvailablePos();

     

    oWnd = radopen(

     

    "http://www.google.com/", null);  

     

     

    oWnd.SetTitle(

     

    "Widget" +titleNum);

     

     

    oWnd.SetSize(200, 200);

    oWnd.DestroyOnClose = 

     

    true;  

     

     

    oWnd.set_behaviors(Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Resize);

    oWnd.add_close(OnClientClose);

    oWnd.moveTo(pos.left, pos.top);

     

     

     

     

     

     

    function OnClientClose(oWnd, eventArgs) {  

    oWnd.close();

    oWnd.DestroyOnClose =

     

    true;

     

     

    }

    Then I used the code as following, the closed window is still in the allwindows list, please help me to find out why, thanks again. 

     

     

     

     

     

     

     

    var allWindows = GetRadWindowManager().GetWindows();  

     

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

     ......

     

     


    }

     

     

     

     

  5. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 14 May 2010 Link to this post

    DestroyOnClose is a property - set it to the RadWindowManager and it will work as expected.
    e.g.
    <telerik:radwindowmanager id=RadWindowManager1 runat=server DestroyOnClose=true ..... />


    Greetings,
    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.
  6. yao wang
    yao wang avatar
    25 posts
    Member since:
    May 2010

    Posted 14 May 2010 Link to this post

    Thanks a lot, it works very well now.

    Have a good weekend,

    Yao
Back to Top