[英]How can I set a value in a combo box in a grid editor
我已经找了好几天,还没有找到任何东西。 我还尝试了一些我开发的代码,例如:
me.comboEstudios = me.getGestionRrhh().down('#pestanaTrabajador').down('#pestanaDatosBasicos').down('#nivelEstudios');
me.comboEstudios.getStore().load({
scope: this,
callback: function(records, operation, success) {
me.comboEstudios.setValue(respJson[0]['NIVEL_ESTUDIO']);
}
});
但是似乎此代码可以很好地用于设置表单组合框中的值,但不适用于网格中的组合框。
如果有人知道该怎么做,我将不胜感激
您需要在beforeedit
事件中beforeedit
进行管理,以我beforeedit
,我使用的是ptype: 'cellediting'
,下面是我的代码:-
plugins: [{ ptype: 'cellediting', clicksToEdit: 1, listeners: { edit: 'cellEditingBlur', beforeedit: function (editor, context, eOpts) { var empDesignation = Ext.getStore('employeedesignation'); if (empDesignation && !empDesignation.isLoaded()) { empDesignation.load(); } } } }],
希望能帮助到你 :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.