RadWindow opening more than once

5 posts, 0 answers
  1. Elangovan
    Elangovan avatar
    7 posts
    Member since:
    Nov 2010

    Posted 07 Dec 2010 Link to this post

    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

     

     

     

     

     

     

     

  2. Cori
    Cori avatar
    562 posts
    Member since:
    Jul 2010

    Posted 07 Dec 2010 Link to this post

    Hello Elangovan,

    Have you tried setting ReloadOnShow="true" on your RadWindow? Perhaps that will fix the issue.
  3. Elangovan
    Elangovan avatar
    7 posts
    Member since:
    Nov 2010

    Posted 08 Dec 2010 Link to this post

    Hi Cori,
     
    I have tried ReloadOnShow="true" on RadWindow, but I'm getting the same behaviour.


    Thanks...
    Elangovan P
  4. Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 08 Dec 2010 Link to this post

    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.
  5. Elangovan
    Elangovan avatar
    7 posts
    Member since:
    Nov 2010

    Posted 08 Dec 2010 Link to this post

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