【问题标题】:telerik - how to refresh child 1 window after child 2 window closeTelerik - 如何在子 2 窗口关闭后刷新子 1 窗口
【发布时间】:2015-01-30 18:11:31
【问题描述】:

请帮帮我! 我有 1 个 apsx 页面和 2 个 uc。 从aspx可以打开radwindow包含uc 1,从uc 1可以打开uc 2。在aspx中,我有:

function CloseRadWindow()
    {
        if(GetRadWindowManager().getActiveWindow() == null)
        {
            refreshGridGiaoDuToan(); //this one refresh aspx page from uc 1
        }
        else
        {
//i hope this one fresh uc1 after close uc2 but error
            var wnd2 = GetRadWindowManager().getWindowByName("wndPopup2");
            console.log(wnd2);
            wnd2.get_contentFrame().contentWindow.refreshGridNhiemVu();
        }

    }

    function refreshGridGiaoDuToan() {
        $find("<%= pnGiaoNganSach.ClientID %>").ajaxRequest("SoGiao");
    } 

在 uc 1 上我有

   function refreshGridNhiemVu() {
    alert("va");
    $find("<%= pnGiaoNganSachChiTiet.ClientID %>").ajaxRequest("RefreshNhiemVu");
}

但是当我关闭 uc 2 时,总是报错:get_contentFrame().contentWindow.refreshGridNhiemVu is not funtion...

所以我的问题是如何在关闭 uc2 后刷新(代码隐藏中的调用函数)uc 1? 请帮我!谢谢!

【问题讨论】:

    标签: telerik radwindow


    【解决方案1】:

    一般来说,这种方法是正确的。您必须确保引用了正确的 RadWindow 实例,并且您可以添加一些检查该函数是否存在以避免错误:

    您可以使用 typeof 检查对其进行扩展,以确保在调用变量之前它是一个函数。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2011-01-19
      • 2023-03-07
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-07-09
      相关资源
      最近更新 更多