javascript - Setting Combobox Value for RowEditing Editor in Extjs -


i kinda facing interesting problem combobox behaving weird.

i have grid 3 columns id , name , associated part.

i have enabled rowediting plugin , editors id textfield(editid), name textfield(editname) , associated part combobox(editpartcombo).

i have button called update.

when select row in grid , press update, rowediting starts @ exact position.

editid , editname shows default values has been selected editcombo populates blank.

code on update button:

{ text: 'update part',  handler: function(btn){  var grid = btn.up('grid'); var selection = grid.getselectionmodel().getselection();   if(selection.length > 0){  alert(selection[0].get('id_part')); ext.getcmp('editpartcombo').setvalue(selection[0].get('id_part'));  var rowediting = grid.getplugin('roweditplugin'); var rowno = grid.store.indexof(selection[0]); rowediting.canceledit();  rowediting.startedit(rowno, 1);   }  else{ ext.msg.alert('error' , 'please select row'); }  } 

following alert gives me proper value of selected column:

alert(selection[0].get('id_part')); 

but somehow net set value combobox.

same thing works fine if open new pop-up window , apply value combobox created on window.

please help.

thanks in advance.


Comments

Popular posts from this blog

php - Zend Framework / Skeleton-Application / Composer install issue -

c# - Better 64-bit byte array hash -

python - PyCharm Type error Message -