我有一个网格,当我展开行时,在该网格中,还有另一组数据要显示。我希望那些网格列是动态的。根据我的 json 数据,我想将数据推送到列中。但是在这里当我给出方法时,调试器不会去那里。任何人都可以解释如何在 extJS 小部件列中加载动态列。
这是我的代码
Ext.define('myApp.view.base.grid.Window', {
extend: 'Ext.window.Window',
alias: 'widget.win',
title: 'my window',
height: 500,
width: 800,
layout: 'fit',
items: [{
xtype: 'grid',
columns: [{
text: 'Col 1',
dataIndex: 'col1',
flex: 1,
},{
text: 'col2',
dataIndex: 'col2',
flex: 1
}],
}],
plugins: [{
ptype: 'rowwidget',
widget: {
xtype: 'grid',
columns:[]//this.createColumn() // This columns i want to load dynamically.
}
}]
});
萧十郎
相关分类