这是初始化视图的正确方法吗? 我有这段代码:
Ext.define('AS.view.View', {
extend: 'Ext.grid.Panel',
alias: 'widget.view',
store: 'Store',
initComponent: function () {}
});
商店是在网格上配置的,不应该看到数据吗?有人能帮助我吗?
答案 0 :(得分:0)
this.callParent(arguments);
放在initComponent方法或者:
//store config
autoLoad: true
或
//view config
listeners: {
render: function(){
this.store.load();
}
}
您还需要配置列。 请参阅完整的工作示例:http://docs.sencha.com/ext-js/4-0/#!/example/grid/array-grid.html