剑道网格加载缓慢

时间:2014-10-01 06:59:24

标签: jquery-ui jqgrid kendo-ui kendo-grid

我正在尝试将一些格式加载到kendo网格中。如果我获得10条记录,则会快速加载。如果我有超过500,则需要花费很多时间才能加载。

任何人都可以帮忙吗?

以下是我的代码:

$("#gridExistingpartners").kendoGrid({
    columns: [{
        field: "PARTNER_ID",
        title: "#",
        filterable: false,
        width: 85
    },
            {
                field: "NAME",
                title: "Partner Name",
                width: 185

            },
            {
                field: "PARTNER_TYPE",
                title: "Partner Type",
                width: 100
            },
            {
                command: { name:"View",text: "View", click: ViewExistingPartners },
                title: "Edit",
                width: 85
            },
            {
                command: { name:"Add",text: "Add", click: AddExistingPartners },
                title: "Add",
                width: 85
            }],
    height: 250,
    autoBind: true,
    scrollable: true,
    sortable: true,
    serverPaging: true,
    serverSorting: true,
    serverFiltering: true,

    refresh: true,
    filterable: {
        extra: false,
        operators: {
            string: {
                startswith: "Starts with",
                eq: "Is equal to",
                neq: "Is not equal to"
            }
        }
    },
    pageable: {
        refresh: true,
        pageSizes: true,
        buttonCount: 5,
        pageSize: 15
    }
});

1 个答案:

答案 0 :(得分:0)

使用可滚动选项加载数据而无需分页和更快的一种方法。因此,向下滚动时会加载网格行。

在网格选项中使用:

  

scrollable:{virtual:true}

Read more here