IUnknown
IUnknown

Reputation: 9809

Populating parent grid from editor combo

i have a grid in ext 3.4 having one of the columns with a combobox editor. {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):

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 -

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 ?

Upvotes: 0

Views: 537

Answers (1)

Dineshkumar
Dineshkumar

Reputation: 361

try this..

combo.ownerCt.up();

Upvotes: 0

Related Questions