setting the store of a combobox in EditableGrid in ExtJs based on another combo
i am using ext designer. (ext version 3.x) i have a combo in a form with autoref 'worker_type'
then there is an editable grid, to add employees
the grid has a employee selection combo as illustrated in the image
i want change the store of this combo based on the 'worker_type' selection. my goal here is to list employees 开发者_开发技巧of a certain worker type only.
but i am unable to access the editable grid combo box in code anyway.
any assistance will be highly appreciated.
thanks
Put a select listener to your first combo, and on selecting a value, load the data store of the second combo. Somewhat this way:
var firstCombo = new Ext.form.ComboBox({
mode : 'local',
store : firstStore,
......
listeners : {
scope : this,
select : function(combo){
// Here load the "secondStore" with selected combo value
// Combo value is combo.getValue()
}
}
});
var secondCombo = new Ext.form.ComboBox({
mode : 'local',
store : secondStore,
......
});
精彩评论