Categories | Question details Back To List | ||||||||
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. Answer posted by dhxSupport on Jul 07, 2009 06:24 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? Answer posted on Jul 07, 2009 06:45 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()
Answer posted by dhxSupport on Jul 07, 2009 07:20 To get actual combo label you can use getText() method: mygrid.cells(rowId,3).getText() Answer posted by Alex (support) on Jul 07, 2009 08:14 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. Attachments (1)
|