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

RadWindow opening more than once

4 Answers 51 Views
Window
This is a migrated thread and some comments may be shown as answers.
Elangovan
Top achievements
Rank 1
Elangovan asked on 07 Dec 2010, 10:55 AM
Hi,

I have written server side code to open a RadWindow using RADOpen method in a treeview's context menu event. its working fine but I have a problem that if I click the other node in the treeview after closing the RadWindow then I'm getting the same RadWindow again.
 
the below is the code behind,

string

 

 

jsNewSection = "function btnNewClick(){ ";
jsNewSection +=
"var oWnd = radopen('Sample.aspx?ID=" + id + "&name=" + strName+ ', 'RadWindow1'); ";
jsNewSection +=
" oWnd.SetSize (800, 280); oWnd.center(); return false; ";
jsNewSection +=
"Sys.Application.remove_load(btnNewClick); }; Sys.Application.add_load(btnNewClick); ";
RadScriptManager.RegisterStartupScript(this, this.GetType(), "btnNewClick", jsNewSection, true);

html,

<telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true" EnableViewState="false" VisibleOnPageLoad="false">
<Windows>
<telerik:RadWindow ID="RadWindow1" runat="server" EnableViewState="false" ></telerik:RadWindow>
</Windows>
</telerik:RadWindowManager>

Please provide me a solution to prevent from opening again.


Thanks...
Elangovan P

 

 

 

 

 

 

 

4 Answers, 1 is accepted

Sort by
0
Cori
Top achievements
Rank 2
answered on 07 Dec 2010, 02:02 PM
Hello Elangovan,

Have you tried setting ReloadOnShow="true" on your RadWindow? Perhaps that will fix the issue.
0
Elangovan
Top achievements
Rank 1
answered on 08 Dec 2010, 06:34 AM
Hi Cori,
 
I have tried ReloadOnShow="true" on RadWindow, but I'm getting the same behaviour.


Thanks...
Elangovan P
0
Georgi Tunev
Telerik team
answered on 08 Dec 2010, 08:53 AM
Hi guys,

ReloadOnShow affects only the way RadWindow loads a content page in its IFRAME, so the property indeed will not help with such problem.

Elangovan, the code that you posted looks OK, but I don't see when it is called. As first step, I would suggest to replace the code in your JavaScript function (btnNewClick()) with a standard alert() and check if it is called again every time - if it does, then the problem is somewhere in the setup / logic that you are currently used. To be able to help however, I need a reproduction sample. If you still experience this problem, please open a support ticket and send me such sample so I can run and check it locally.


Regards,
Georgi Tunev
the Telerik team
Browse the vast support resources we have to jumpstart your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Elangovan
Top achievements
Rank 1
answered on 08 Dec 2010, 11:19 AM
Hi Georgi Tunev,

Thanks for your reply. I have fixed the issue by removing the "return false;" in the btnNewClick() script. now its working good.

Thanks...
Elangovan P
Tags
Window
Asked by
Elangovan
Top achievements
Rank 1
Answers by
Cori
Top achievements
Rank 2
Elangovan
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or