have a grid in ext 3.4 having one of the columns with a combobox editor.
Code:
{header: ' Facility', dataIndex: 'facility',editor: borrfacCombo}
The underlying store of the grid has 2 fields (and more) - facility and facilityid
The editor combo is loaded from a store which has a mapping of id and description(something similar to below):
Code:
borrfacCombo=Ext.create('Ext.form.field.ComboBox', { displayField: 'name', valueField: 'id', store: { fields: ['id', 'name'], data: [ {id: 'scheme2', name: 'Green Envy'}, ... ] } });
When a particular 'facility' is selected in the combo - I need the corresponding 'facilityid' to be populated in the selected row of the grid's store.
i am trying the following on 'select' in the combo -
Code:
listeners:{select:function(combo, record, index) { var val=record.get('id'); var grid=combo.ownerCt.floatParent; var selectedRecord = grid.getSelectionModel().getSelection()[0];.... } }
But 'combo.ownerCt' always shows up as 'undefined'.
How do I resolve this ?