我有2页(主页和Сategory) 在页面上加载主页按钮。单击按钮运行面板RadWindow(NavigateUrl:Сategory)。
protected void ShowWindow()
{
string script = "function f(){$find(\"" + RadWindow_editor.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "key", script, true);
}
protected void RadButtonEdit_Click(object sender, EventArgs e)
{
ShowWindow();
}
在此按钮上加载RadWindow NavigateUrl - Сategory。点击按钮关闭RadWindow。
protected void RadButtonEdit_Click(object sender, EventArgs e)
{
ClientScript.RegisterStartupScript(Page.GetType(), "mykey", "Close();", true);
}
function GetRadWindow() {
var oWindow = null;
if (window.radWindow)
oWindow = window.radWindow;
else if (window.frameElement.radWindow)
oWindow = window.frameElement.radWindow;
return oWindow;
}
function Close() {
var oWindow = GetRadWindow();
oWindow.argument = null;
oWindow.close();
return false;
}
如何刷新页面主页? (单击按钮关闭RadWindow)
谢谢!
答案 0 :(得分:0)
有OnClientBeforeClose和OnClientClose等客户端事件
http://demos.telerik.com/aspnet-ajax/window/examples/clientsideevents/defaultcs.aspx
检查这个链接,它会给你一个想法
How to close the radwindow on serverside and refresh the parent page
您还应该查看在父页面中使用RadAjaxManager将窗口事件发送给父窗口,如以下演示所示:Grid and Window。它侧重于刷新网格,而不是实例中的页面,但将事件发送到父页面的概念保持不变。
答案 1 :(得分:0)
如果您的页面未刷新,则问题出在页面中。在URL中有一个has可能会导致此问题。请务必更改网址,以便获得新的GET请求。