How to keep open the RadWindow after refreshing the parent window

2 posts, 0 answers
  1. Nanda
    Nanda avatar
    2 posts
    Member since:
    Jun 2012

    Posted 14 Jun 2012 Link to this post

    Hello there,
    I am opening a RadWindow from a parent page. I've started filling the form in the Radwindow. After finishing certain process, I am reloading the parent page and in the same time, I would like to continue filling the form in the RadWindow without closing it.

    I am facing some problem here, it is actually reloading the parent page. But at the same time, it is closing the RadWindow. I've tried many possible solutions and I failed. Need your help on this one...

    Here is the sample code I am using to refresh the parent page...

    This is from aspx (RadWindow) page...

    <telerik:radcodeblock id="RadCodeBlock1" runat="server">
            <script type="text/javascript">
                function CloseAndRebind(args) {
                    GetRadWindow().BrowserWindow.refreshGrid(args);
                    //GetRadWindow().close();
                }
     
                function GetRadWindow() {
                    var oWindow = null;
                    if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
                    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
     
                    return oWindow;
                }
     
                function CancelEdit() {
                    GetRadWindow().close();
                }
     
                function TestScript() {
                    CloseAndRebind();
                }
        
        </script>
     
    </telerik:radcodeblock>
         
    This is from Parent Page (aspx)

    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
     
            function refreshGrid(arg) {
                if (!arg) {
                    $find("<%= headerRadAjax.ClientID %>").ajaxRequest("Rebind");
                }
                else {
                    $find("<%= headerRadAjax.ClientID %>").ajaxRequest("RebindAndNavigate");
                }
            }
        </script>
    </telerik:RadCodeBlock>

    and the last bit from code behind of parent page

    protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
    {
        //HeaderControl.ThisisFromRAD();
        txtText.Text = "Updated";
    }


    I've placed some text box control to test the same. It is updating the value in the text box. but at the same time, it is closing the RadWindow. But I don't want the Radwindow to be closed. 

    Appreciate your support on this. thanks 
  2. Nanda
    Nanda avatar
    2 posts
    Member since:
    Jun 2012

    Posted 15 Jun 2012 Link to this post

    this is actually fixed. However AjaxcontrolId in Ajaxsetting is not properly handled. this is now handled properly and it is working fine as expected.
Back to Top