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

How to keep open the RadWindow after refreshing the parent window

1 Answer 151 Views
Window
This is a migrated thread and some comments may be shown as answers.
Nanda
Top achievements
Rank 1
Nanda asked on 14 Jun 2012, 02:32 PM
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 

1 Answer, 1 is accepted

Sort by
0
Nanda
Top achievements
Rank 1
answered on 15 Jun 2012, 08:20 AM
this is actually fixed. However AjaxcontrolId in Ajaxsetting is not properly handled. this is now handled properly and it is working fine as expected.
Tags
Window
Asked by
Nanda
Top achievements
Rank 1
Answers by
Nanda
Top achievements
Rank 1
Share this question
or