简体   繁体   English

Kendo窗口刷新不适用于IE

[英]Kendo window refresh not working for IE

I am facing an issue with kendo window. 我现在遇到剑道窗口的问题。 It is not refreshing without debugging mode in IE 11. However the same refreshing mechanism is working if you press F12 and ran the url. 如果没有IE 11中的调试模式,它不会刷新。但是,如果您按F12并运行url,则相同的刷新机制正在起作用。 My Kendo version is "2015.1.318". 我的Kendo版本是“ 2015.1.318”。

Back ground : at my project , we have kendo window feature. 背景:在我的项目中,我们具有剑道窗口功能。 In that window , we have a drop down. 在那个窗口中,我们有一个下拉菜单。 The kendo window is opening trough a button click event. 剑道窗口通过按钮单击事件打开。 Kendo window should refresh every time before open, so that drop down value will update properly. 剑道窗口应该在每次打开之前刷新,以便下拉值可以正确更新。

Actually , I saw that , this is working perfectly with other browser like chrome and Mozilla. 实际上,我看到了,它与chrome和Mozilla等其他浏览器完美配合。 Even it is working with IE in debugging mode. 即使它在调试模式下与IE一起使用。 Even before button click to open the kendo window, if you clear the browser cache , then also it is working. 即使在单击按钮之前打开kendo窗口,如果您清除浏览器缓存,那么它也可以正常工作。

My project is only supporting IE, So I need to resolve it without F12 work around or cache clear work around. 我的项目仅支持IE,因此我需要在不使用F12情况下解决它或缓存清除的问题。 I have used following technique to resolve. 我使用以下技术来解决。

1) read : { cache: false } 2) $("#window1).data("kendoWindow").refresh()

But not working. 但是没有用。 Any help ? 有什么帮助吗?

You can use onActivate window event and manually reload all sources which you need, I think that even better solution because it will not recreate all DOM elements for your window 您可以使用onActivate窗口事件并手动重新加载所需的所有源,我认为这是更好的解决方案,因为它不会为窗口重新创建所有DOM元素

    var activate = function(){
        var dd= $("#dropDown").data("DropDownList");
        if(dd){
            dd.refresh();
        }
    }

    var win = $("#window1").data("kendoWindow");
    if (win) {
        win.title('window1');
        win.setOptions({
            width: '60%',
            modal: true,
            maxHeight: $(window).height() - 80,
            maxWidth: $(window).width(),
            deactivate: deactivate,
            activate: activate,
            actions: ["Close"]
        });
        win.center().open();
    }

正确的语法

$("#window1").data("kendoWindow").refresh({ cache: false });

Thanks for contributing the answers. 感谢您提供答案。

The issue is resolved by using POST method. 通过使用POST方法解决了此问题。 Earlier I was using $http.get. 之前我使用$ http.get。 But I changed it to $http.post. 但是我将其更改为$ http.post。 Now refresh is working as expected. 现在刷新正在按预期方式工作。

Thanks again 再次感谢

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM