Categories | Question details Back To List | ||
How to obtain id of dhtmlxcombo Hi again, very glad with your support
i have this situation: I have integrated dhtmlxGrid and dhtmlxCombo with autocomplete. The autocomplete comes from the next file, complete.php: function getDataFromDB($mask){ if ( $_GET["pos"]==0)
well, and the ordinary en the html file: mygrid.setColTypes("ed,ed,co,dhxCalendar,price,ed,ed[=c4*c5],combo");
So, in this case i have the last column with the dhtmlxcombo with autocomplete....im using an example of the table countries, there are 3 fields: item_id,item_nm,item_cd It works fine, no errors. But what happens if i want to save only the id of the selected countrie... mmmm, i mean: i write: 'Aust'..... and fast come the Autocomplete with the suggestion: 'Austria' well, when im done and press Enter, its suppose is inline editing, but there is a method to get the id of the selected option because i see in the complete.php that generates an xml with: print("<option id=\"".$row["item_id"]."\">"); so i see $row["item_id"] putting into an 'id' of the option oohh its so confuse, i hope you understandme, i dont speak english so good Answer posted by Alex (support) on May 07, 2009 01:24 Hello, Please, use value instead of id: ... The value of the selected option is the cell value of the grid. So, you can use the following method: var value = grid.cells(row_id,cell_index).getValue(); |