一旦通过母版页关闭了 radwindow,我正在尝试重新绑定我的网格。我的网格位于 aspx 页面中的用户控件中。在母版页中,我有:
function CancelEdit() {
GetRadWindow().Close();
}
function CloseAndRebind() {
GetRadWindow().BrowserWindow.refreshGrid(); // Call the function in parent page
GetRadWindow().close(); // Close the window
}
function refreshGrid() {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}
我在用户控件中有以下 javascript:
<script type="text/javascript" language="javascript">
function refreshGrid() {
$find("<%= RadAjaxManager.GetCurrent(me.Page).ClientID %>").ajaxRequest("Rebind");
}
</script>
一旦我在 radwindow 中关闭更新数据库,我就会注册一个 javascript:
ScriptManager.RegisterStartupScript(Page, Page.GetType(), "mykey", "CloseAndRebind();", True)
我可以看到我的数据源发生了变化,但网格没有更新。有什么建议么?
编辑 ::
The structure is something like this:
I have master page which has the RadAjaxManager.
There is a main page which has a user control
Another user control inside above user control which has the RadGrid
Then there is an aspx page that opens as radwindow