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

Refresh parent popup

1 Answer 163 Views
Window
This is a migrated thread and some comments may be shown as answers.
sandy
Top achievements
Rank 1
Iron
Veteran
sandy asked on 02 Jan 2013, 09:42 AM
Hi, i have a rad scheduler.
when am clicking add new recurrence am opening new popup window for adding records.
so in that i have a button for selecting members(popup page). so when am clicking this button am opening radwindow for selecting members in checked listbox.
so here am saving  values in session. and on button click am closing this select members popup and i want to refresh the parent popup that is add recurrent event popup and fillup checklistbox with session values.here am getting values in session. but the parent pop is not refreshing

this is my select members popup(child popup)
function CloseAndRebind(args) {
        GetRadWindow().BrowserWindow.refreshGrid(args); // Call the function in parent page
        GetRadWindow().close(); // Close the window
    }
function getRadWindow() {
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}

function closeWindow() {
    getRadWindow().close();
}    

this is my parent popup(addrecurrent popup)
<script type="text/javascript">
        //<![CDATA[
        function openWin() {
            var oWnd = radopen("SelectMembers.aspx", "RadWindow1");
            oWnd.setSize(818, 565);
            oWnd.moveTo("100px", "60px");
        }
      </script> 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 02 Jan 2013, 01:34 PM
Hello Sandy,

The following demo shows a very similar scenario: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window. The point is that some code must be added that will initiate the request. In the demo it is the refreshGrid() function in the main page that is called from within the RadWindow. You can also use the OnClientClose event of the control to always execute some code after the popup is closed. This help article may be useful in case you are using the ContentTemplate, so you can properly use AJAX with it. In case you load entire pages in the RadWindows you may need the approach from this one to call a function in the appropriate page in order to initiate the postback there.


Kind regards,
Marin Bratanov
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Window
Asked by
sandy
Top achievements
Rank 1
Iron
Veteran
Answers by
Marin Bratanov
Telerik team
Share this question
or