Extjs数据未完全加载

时间:2012-02-14 15:30:58

标签: javascript extjs

我正在使用ExtJS,我注意到它似乎没有加载完整列表。它加载了部分列表并挂起。

我必须刷新或扩展popupwindow才能完全加载数据。

我该如何解决这个问题?

var mystore = new Ext.data.Store({
    url: '/jsonfeed&id=' + encodeURIComponent(this.idUrl),
    sorters: [{
        property: 'ImpactSummary',
        direction: 'DESC'
    }],
    reader: new Ext.data.JsonReader({
        root: 'xml.RowElement',
        fields: [{
            name: 'DisplayName',
            mapping: 'DisplayName'
        }, {
            name: 'ImpactSummary',
            mapping: 'ImpactSummary',
            type: 'int'
        }, ]
    }),

});

var listView = Ext.create('Ext.grid.Panel', {
    store: mystore,
    multiSelect: false,
    splitHandleWidth: 10,
    width: 350,
    height: 670,

    columnLines: true,


    //reserveScrollOffset: true,
    renderTo: containerEl,

    columns: [{
        text: "DisplayName",
        dataIndex: 'DisplayName',
        renderer: showDisplayName,
        sortable: true,
        flex: 60
    }, {
        text: "ImpactSummary",
        dataIndex: 'ImpactSummary',
        renderer: showElementName,
        sortable: true,
        flex: 40
    }]
});
//pass along browser window resize events to the panel         
Ext.EventManager.onWindowResize(listView.doLayout, listView);
console.log('Ext version ' + Ext.version);

1 个答案:

答案 0 :(得分:0)

您使用的是哪个版本的EXTj?

创建商店后,尝试强制加载:

mystore.load(function(records, operation, success) {
    enter code hereenter code here`console.log('loaded records');
});

您可以执行的另一项测试是将您的网格设置为' autoScroll:true'

相关问题