Both RadWindowManager and RadWindow have onClientClose event.
Once RadWindow is closed, OnClientClose
will be called. Then you can call parent page's code behind via Ajax or full post back.
Parent Page
<telerik:RadWindowManager .... OnClientClose="clientClose">
</telerik:RadWindowManager>
OR
<telerik:RadWindow ... OnClientClose="clientClose">
</telerik:RadWindow>
<telerik:RadAjaxManager ... ID="RadAjaxManager1"
OnAjaxRequest="RadAjaxManager1_AjaxRequest">
</telerik:RadAjaxManager>
Script inside Parent Page
function clientClose(oWnd, args) {
// Optional arguments passed from RadWidow
var arg = args.get_argument();
// Here the example for ajax post back using RadAjaxManager
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest(arg);
}
Parent Page Code Behind
protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
// Argument passed by child window. It is an optional.
if (e.Argument == "xxx")
{
// Do something
}
}
Updated: to collect the return argument from child window
<script language="javascript" type="text/javascript">
function closeWin(arg) {
GetRadWindow().Close(arg);
}
</script>
<asp:Button ID="btnClose" runat="server" Text="Close"
OnClientClick="closeWin('something');return false;" onclick="btnClose_Click"/>