Select combo in form

Hello,

I have a combo (idProveedor) with a form (form_2) and I want with an event to select a value of it with the value of selected grid (grid_5)

I write this:

var str = [
{ type:“combo” , name:“idProveedor”, label:“Proveedor”, width:250, connector:“xml/comboProveedor.inc.php?idProveedor=”+grid_5.cells(rowgrid,2).getValue(), labelWidth:“250”, labelHeight:“21”, inputWidth:“250”, inputHeight:“21”, labelLeft:“390”, labelTop:“215”, inputLeft:“390”, inputTop:“236”, position:“absolute” },

var form_2=tabbar.cells(“Datos”).attachForm(str);

grid_5.attachEvent(“onRowSelect”, function(id,ind){
form_2.idProveedor.selectOption(id);
});

But I have an error: form_2.IdProveedor is undefined

How I must do?

Thanks a lot for all your help!

Hello,

check your codeline:
form_2.idProveedor.selectOption(id);

actualy you need:
form_2.getCombo(“idProveedor”).selectOption(id);