OK!I can see why and also understand why.
I’m grateful for your answers that have helped me a lot.
I’m now thru this topic and have finally a solution that I enclose below.
Thanks!
ITMA
<script type="text/javascript">
function on_hoursvars_begin_edit(cell) {
a_curItemIndex = cell.getItemIndex();
//Get the current cell value. Unlike the previous
//sample, this sample displays "Product_Name", but
//actually stores "Product_No".
var v = cell.getValue();
//Set the drop down box's selectedIndex based on the
//current value. Each drop down item's "value" property
//contains the "Product_No".
var dropDownBox = document.getElementById("ddlhoursvars");
for (var i = 0; i < dropDownBox.options.length; i++) {
if (dropDownBox.options[i].value == v) {
dropDownBox.selectedIndex = i;
return;
}
}
//No match has been found, display the "Please Select" item
dropDownBox.selectedIndex = 0;
}
function on_hoursvars_end_edit(cell) {
//Get the new value from the drop down box
var dropDownBox = document.getElementById("ddlhoursvars");
var selectedIndex = dropDownBox.selectedIndex;
if (selectedIndex > 0)
return dropDownBox.options[selectedIndex].value;
return null;
}
function on_hoursvars_column_gettext(column, item, cellValue) {
//Gets values from a textcolumn that is hidden
var dropDownBox = document.getElementById("ddlhoursvars");
return column = item.getCell(9).getValue();
}
</script>
--------------------