剑道UI网格不能在ie中自动刷新

Kendo UI grid not refresh automatically in Internet Explorer

本文关键字:刷新 ie UI 网格 不能 剑道      更新时间:2023-09-26

我使用Kendo UI Grid创建了一个项目,它在Chrome和mozilla中运行得非常好。网格可以自动刷新。但在探索者,它不能!只有第一次(当页面第一次打开时)数据源工作(脚本),那么数据源在刷新时间不工作。

这两种情况下,网格无法刷新:

  1. 当我从"EDİTPAGE"返回时,我可以看到网格中更新的值。但是在chrome和mozilla中,我可以看到。
  2. 我有一个名为setInterval的自动刷新命令,网格无法在资源管理器中再次刷新。它只能在Chrome和Mozilla中刷新。

        setInterval(function () {
            $("#grid").data("kendoGrid").dataSource.read();
        }, 10000);    /// not work!
    
     $(document).ready(function () {
          $("#grid").kendoGrid({
                        sortable: true,
                        pageable: {
                            input: true,
                            numeric: false,
                            buttonCount: 5,
                            pageSizes: true
                        },
                        autoBind: true,
                        height: 500,
                        selectable: "row",
                        dataSource: {
                            pageSize: 5,
                            transport: {
                                read: "/Home/Getdata",   //// here works one time in explorer. Then it's not work. I change page and come back again but not work.
                                type: "json"
                            }, schema: {
                                data: "data",
                                total: "total"
                            },
                            serverPaging:true
                        },
                        change: function (e) {
                            var item = this.dataItem(this.select());
                            win.content(template(item));
                            win.open();
                        },  rowTemplate: kendo.template($("#rowTemplate").html()),altRowTemplate: kendo.template($("#altTemplate").html())
                    }).data("kendoGrid");
    

先问几个问题。你用的是什么版本的IE ?你使用的是哪个版本的网页游戏?你是否检查过开发工具中的网络选项卡,看看当你加载网格时是否有500错误?

是否将setInterval()绑定到事件?我怀疑您需要将其附加到文档准备功能中。