ext3.4中有一个网格,其中一列带有组合框编辑器。{header:"Facility",dataIndex:"Facility",editor:borrfacCombo}
网格的底层存储有2个字段(以及更多)-设施和设施
编辑器组合是从一个有id和描述映射的商店加载的(类似于下面):
borrfacCombo=Ext.create('Ext.form.field.ComboBox',
{ displayField: 'name',
valueField: 'id',
store: {
fields: ['id', 'name'],
data: [
{id: 'scheme2', name: 'Green Envy'},
...
]
}
});
当在组合中选择特定的"设施"时,我需要在网格存储的选定行中填充相应的"设施id"
我正在组合中的"选择"上尝试以下操作-
listeners:{
select:function(combo, record, index) {
var val=record.get('id');
var grid=combo.ownerCt.floatParent;
var selectedRecord = grid.getSelectionModel().getSelection()[0];
.... }
}
但是"combo.ownerCt"总是显示为"未定义"
如何解决此问题?
试试这个。。
combo.ownerCt.up();