Combo selectOption error

When I run the following code I get this error:



User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.648; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322)

Timestamp: Fri, 10 Jul 2009 20:09:22 UTC



Message: ‘_childIndexes’ is null or not an object

Line: 5685

Char: 3

Code: 0

URI: atgtest1/beta/scripts/dhtmlxgrid.js





var iRow = grdItems.getRowsNum();

var combo = grdItems.cells(iRow,1).getCellCombo();    

combo.addOption(objItem.ID,objItem.Caption+mPrice);

combo.selectOption(0); //ERROR HERE. I have tried several values (-1, 1, etc) as well as this line:



//combo.selectOption(combo.getIndexByValue(objItem.Caption+mPrice));



Thanks kindly,

James Snyder


Hello,


in case of combo excell you should use grid method to set value: grid.cells(rowId,cellIndex).setValue(value);


//combo.selectOption(0);


grdItems.cells(iRow,1).setValue(objItem.ID);