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

Rad window Open Again And Again When Page Going Postback

2 Answers 71 Views
Window
This is a migrated thread and some comments may be shown as answers.
Chandan Kumar
Top achievements
Rank 1
Chandan Kumar asked on 05 May 2010, 08:32 AM
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 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 05 May 2010, 09:22 AM
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.
0
Chandan Kumar
Top achievements
Rank 1
answered on 05 May 2010, 01:34 PM
Thanks.
Tags
Window
Asked by
Chandan Kumar
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Chandan Kumar
Top achievements
Rank 1
Share this question
or