0

我有 10000 条记录的网格。我试图通过读取填充网格的存储来检索网格数据。但我无法从商店中读取所有数据。相反,仅检索了 5000 条记录。ExtJs4 有限制吗?请在下面的代码片段中找到。

在此处输入代码

    onDownloadXLS : function(btn, e) {
        var store = this.getGridStoreStore();
        alert(store.getCount());// This is returning only 5000 rows not 10000.
        var records = store.data.items.map(function(r){ return r.data });
    }

    Ext.define('MyApp.store.GridStore', {
    extend: 'Ext.data.Store',
    model: 'MyApp.model.GridModel',
    proxy: {
        type: 'ajax',
        url: "data/test.json",
        reader: {
            type: 'json', 
            root: 'performance'
        }
    },
    sorters: {property: 'uploadedDate', direction: 'DESC'},
    groupField: 'uploadedDate',
    autoLoad: true
});
4

1 回答 1

3

我在这里能给你的唯一答案是浏览器应用程序永远不应该加载这么多的数据。如果您被迫加载这么多数据,您就会遇到设计问题。

在网格的情况下,您应该使用分页或无限滚动(使用缓冲存储)并将所有排序和搜索/过滤操作委托给服务器。

基本上没有限制。看到这个具有 6000 多条记录的无限滚动的 Sencha 示例。

于 2013-01-11T07:31:56.883 回答