【问题标题】:Kendo UI Grid virtual scrolling makes infinite ajax hitsKendo UI Grid 虚拟滚动可实现无限的 ajax 命中
【发布时间】:2018-04-16 07:32:04
【问题描述】:

当我在网格内无限点击获取网格数据方法时向下滚动时,我正在加载一个带有虚拟滚动选项的 Kendo UI 网格,并且由于不明原因。

我的页面也有 Angular JS。

页码始终以 1 发送,但至少应增加为 2。

网格定义如下:

dataSource: {
    serverPaging: true,
    serverSorting: true,
    serverFiltering: true,
    pageSize: 10,
    transport: {
        read: URL
    },
    schema: {
        data: function(data) {
            /* Few business filter operation done here */
            return data.Items;
        },
        total: function(data) {
            if (data.Items != null && data.Items.length > 0) {
            // Every record of the current data set has total employees count
            // Thus returning the first value                                        
            return data.Items[0].totalEmployees;
        }
        return 0;
        },
                    scrollable: {
                        virtual: true
                    },
                sortable: true,
                columns: columns,
                dataBound: function(arg) {
                    /* few more business operations */
                },
                scrollable: {
                    virtual: true
                },
                serverPaging: true,
                serverSorting: true,
                serverFiltering: true,
                editable: {
                    'mode': 'inline',
                    'createAt': 'top'
                },

图片显示无限次点击:

【问题讨论】:

    标签: ajax kendo-grid lazy-loading


    【解决方案1】:

    我不止一次加载了 kendo.all.js 文件,恰好是三次。我确保它只加载一次,问题就消失了。

    【讨论】:

      猜你喜欢
      • 2013-04-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-03-04
      • 1970-01-01
      • 2021-04-29
      相关资源
      最近更新 更多