Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Pavan on Oct 04, 2007 13:21
open dhtmlx forum
Working with combobox

The combo box options hold key value pair. In my case the key is the code number and value is the corresponding description.

Is there any way to read the Key of the selected Value through javascript?

I am populating the options in the combo box of second column based on the value selected in the first column. Isd there any way to clear of the existing options before loading the combobox with new options?
Answer posted on Oct 04, 2007 16:31
There is no direct access to such data but it can be obtained as

var label=grid.cells(i,j).getValue();
var combo=grid.getCombo(j);
var value=combo.keys[combo.values._dhx_find(label)];