combo

Hi,



I had a combo in my grid. I used combo.put(key,value). value will be displayed on the grid but i need the key to save it in the database. so may i know how to get the key based on the value.



haritha



Actually ,the combo in grid show values, but any data operaton will use key related to value. getValue, serialization, dataprocessor - all of them will work with keys, so, in common case, value to key translation will be done automatically.

If by some reason you still need to obtain such data manually, you can use something similar to next

var combo = grid.getCombo(index)
var key = combo.keys[combo.values._dhx_find(value)];