【发布时间】:2012-04-06 03:10:21
【问题描述】:
我想遍历存储并动态创建网格列。当我在 Store 的 onLoad 事件中使用 columns.push 方法时,我得到了这个错误:“headerCtCfg is undefined”。这是我的代码:
Ext.define('App.view.UserList' ,{
extend: 'Ext.grid.Panel',
alias : 'widget.userlist',
store: 'Users',
initComponent: function() {
var store = Ext.getStore( this.store );
store.on('load', function () {
var columns = this.columns = [];
columns.push( {header: 'H', dataIndex: '0'} );
提前谢谢你
【问题讨论】: