我要建議GridView的loadMask
配置如文檔覆蓋here。但是我注意到由於某種原因,它不適合我。
如果它不適用於您,只需使用gridview的refresh
事件作爲覆蓋here。它只會在數據完全加載到網格後觸發。如果您正在使用MVC應用程序架構
Ext.create('Ext.grid.Panel', {
title: 'My Grid Panel',
// ... other grid panel configs
viewConfig: {
listeners: {
refresh: function(gridview) {
console.log(gridview);
console.log('is fully loaded');
}
}
},
});
或者:你可以像這樣通過您的GridPanel的viewConfig
配置,將其固定
Ext.define('MyApp.controller.MyController', {
extend: 'Ext.app.Controller',
models: ['MyModel'],
stores: ['MyStore'],
views: ['MyGridPanel'],
init: function() {
var me = this;
me.control({
// ... other event handlers
'mygridpanel > gridview': {
refresh: function(gridview) {
console.log(gridview);
console.log('is fully loaded');
}
},
});
}
});
感謝。看起來很有幫助! – 2012-08-02 13:17:26
有點晚了,但我只是不得不面對類似的問題。在Extjs 3.4中,我可以使用grid view事件'viewready'。 – 2014-08-20 09:24:22