grid Combo getvalue

I 've used a combo cell in dhtmlxgrid and I have set the key & value of the combo in my javascript.

In editing combo when I use mouse for selection, getValue() of the cell returns the key of the combo but when I use Enter key instead of mouse , getValue() of the cell returns the value instead of key.

Could you please provide any kind of sample where we can reproduce this issue. How are you getting getValue() of the cell after mouse selection and on Enter key?


mygrid = new dhtmlXGridObject('gridbox');


mygrid.setImagePath("imgs/");


mygrid.setInitWidths("60,50,150,100,80,80,90,88,20,20,20,1,1")


mygrid.setColAlign("center,left,right,right,right,right,left,right,center,center,center,center,center")


mygrid.setColTypes("co,ed,ro,co,ro,ro,co,co,ro,ro,ro,ro,ro");


mygrid.setSkin("light");


My forth column  is a combo that is set  when reading xml in javascript as the following


var cmb3=mygrid.getCombo(3);


cmb3.clear();


for (ii=0; ii<cObj.SID.length; ii++)



if (cObj.SNM[ii]!="") cmb3.put(cObj.SID[ii],cObj.SNM[ii]);  else cmb3.put(cObj.SID[ii],"…");



the combo sets properly.



In getting the value (I need key not value) if use of  mygrid.cells(rowId,3).getValue()



 




 



 

To get actual combo label you can use getText() method:
mygrid.cells(rowId,3).getText()


We have found some issue with selection in co type.


Please, try to use attached file instead of the original. If the problem still isn’t solved, please, send the complete demo to re-create it.


dhtmlxgridcell.zip (7.83 KB)