I have a grid where in one cell, if a value is changed, some calculations are done and it then should change a combo box in another cell to reflect the calculations done (The combo box contains pass/fail/error as it values.)
I’ve looked in to the dhtmlXGridComboObject API and there doesn’t seem to be any visible way of setting this there so I thought I could set the value of the cell.
I’ve simplified what my code looks like to show you what I have tried:
function onCellEdit(stage,rowId,cellId){
if(stage == 2 && cellId == 1){
calc = checkCalcs(rowId);
// calc return -1 on error, 1 if pass and 2 if fail
mygrid.cells(rowId,4).setValue(calc);
}
}
I appreciate the help, thanks.
There is no any special command to change selection in combobox, so your approach is correct.
State of any eXcell can|may be changed by setValue command
In case of coro excell , component will search the existing pare of value-label, with value equal to new one, and select it ( visible text will be equal to label )
Beware that if value will not be found in collection, it will be set as visible text ( the combobox way )