Rad window Open Again And Again When Page Going Postback

3 posts, 0 answers
  1. Chandan Kumar
    Chandan Kumar avatar
    68 posts
    Member since:
    Mar 2010

    Posted 05 May 2010 Link to this post

    Hello Sir,

    When i Open Rad Window and when i close it then i m firinng btnclick event on Client Close Of Window.
    After parent page postback again rad window open Autometically.

    How Can i avoid it.
    my client close function is as below.

    function

     

    OnClientClose(oWnd, args) {

     

    $get(

    '<%=btnRefresh.ClientID%>').click();

     

    }


    Please Help Me

    Thanks.
    Chandan Kumar
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 05 May 2010 Link to this post

    Hi Chandan Kumar,

    I suppose you have set the VisibleOnPageLoad property of RadWindow to True (for showing the window from server), which in turn opens the window for every postback. So one suggestion would be opening the window from client code as shown below.

    From code behind, invoke the client method:
     
    string script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(showWindow);</script>";   
    ClientScript.RegisterStartupScript(this.GetType(), "showWindoww", script);  

    Then in client event, open the window using code:
     
        <script type="text/javascript">   
            function showWindow() {  
                radopen('url''');  // Opens the window 
            }   
        </script>  

    Another option would be  setting the VisibleOnPageLoad property to false with code when suitable, depending on the particular scenario.
    Checkout the forum to know more about the this: re-open when postback


    Regards,
    Princy.
  3. Chandan Kumar
    Chandan Kumar avatar
    68 posts
    Member since:
    Mar 2010

    Posted 05 May 2010 Link to this post

    Thanks.
Back to Top