Posted
on May 17, 2011
(permalink)
Okay - it isn't only with the upload.
Open radWindow from edit page.
Delete upload from radGrid in radWindow.
Close radWindow.
Updates the edit page radGrid that holds the upload information
Repeat:
Open radWindow from edit page.
Delete upload from radGrid in radWindow.
Close radWindow.
Result: it closes the radWindow - but does not update the radGrid in the edit page.
JS parent page:
function openNewAttWin(ID) {
var oWnd1 = radopen("AddAttachment.aspx?ID=" + ID, "RadWindow1");
oWnd1.setSize(700, 500);
oWnd1.add_close(OnClientClose);
}
function CloseOnReload() {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest();
}
function refreshGrid() {
var radMgr = $find("<%=RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}
<telerik:RadWindowManager ID="RadWindowManager1" ShowContentDuringLoad="false" VisibleStatusbar="false"
ReloadOnShow="true" runat="server" Skin="Web20" OnClientClose="CloseOnReload" DestroyOnClose="true">
<Windows>
<telerik:RadWindow ReloadOnShow="false" ID="RadWindow1" VisibleStatusBar="false" OnClientClose="CloseOnReload"
Width="700px" Height="500px" Title="Add Attachment" Behaviors="Close, Move, Resize, Maximize"
runat="server" NavigateUrl="AddAttachment.aspx" Modal="true">
</telerik:RadWindow>
JS radWindow:
function GetRadWindow() {
var oWindow = null;
if (window.radWindow)
oWindow = window.radWindow;
else if (window.frameElement.radWindow)
oWindow = window.frameElement.radWindow;
return oWindow;
}
function CloseOnReload() {
GetRadWindow().Close();
GetRadWindow().BrowserWindow.refreshGrid();
}