在开发UI时,我在ExtJS上遇到了一个问题:
我有一个简单的数组,它包含:
['1234','2345','3456']我创建了一个网格来加载一些数据,该网格中的一列应该包含一个组合框,我已经这样做了:
this.cellEditing = new Ext.grid.plugin.CellEditing({
clicksToEdit: 1
});我有一个空存储的编辑器:
{text: "Tickets", renderer: Utils.renderCombo, dataIndex: 'ASSOC_TKT_NUMS', flex: 1,
editor: Ext.create('Ext.form.field.ComboBox', {
editable: false,
queryMode: 'local',
store: []
})
},在我的方法"renderCombo“上,我这样做,因为我需要在存储中呈现我的数组(它首先使用[],正如您在上面看到的):
renderCombo: function(value, meta, record) {
meta.column.editor.getStore().loadData(value);
}但这似乎不起作用,我甚至看到我的专栏是空的,而不是组合框。
在我的实现中,我是不是遗漏了什么或者需要改变什么?
提前谢谢。
发布于 2015-05-15 20:41:03
指定时,此列的编辑器字段将为组合框,首先需要创建单元格编辑器,然后才指定编辑字段
editor: Ext.create('Ext.grid.CellEditor', {
field: Ext.create('Ext.form.field.ComboBox', {
editable: false,
queryMode: 'local',
store: []
})
})https://stackoverflow.com/questions/30253387
复制相似问题