Hi averybody,
i’ve a problem when i retrieve reference to a combo inside a dthmlx form. These are my import:
[code]
[/code]and this is the code:
[code]var formData,dhxLayout;
var mygrid, optCompany,optCliente, optCommittente, optProgetto, myForm;
formData = [
{type:“label”, label:"",labelWidth: 10},
{type:“newcolumn”},
{type:“settings”, position: “label-right”,labelWidth: 100, inputWidth:200},
{type:“label”, label:"",labelWidth: 10},
{type:“calendar”, dateFormat: “%d/%m/%Y”, label: " Data:", position:“label-left”, name: “fdata”, className: “my_calendar”,inputWidth:206},
{type: “select”, label: “Company:”, position:“label-left”, name:“fcompany”, options:companyOption},
{type: “select”, label: “Cliente:”, position:“label-left”, name:“fcliente”, options:clienteOption},
{type: “select”, label: “Committente:”, position:“label-left”, name:“fcommittente”, options:optCommittente},
{type: “select”, label: “Progetto:”, position:“label-left”, name:“fprogetto”, options:optProgetto},
{type:“checkbox”, name:“f_sede”, label:“In Sede”,position:“label-left”,labelWidth: 100},
{type:“checkbox”, name:“f_mezzagiornata”, label:“Mezza Giornata”,position:“label-left”,labelWidth: 100},
{type:“checkbox”, name:“f_fullgiornata”, label:“Giornata Intera”,position:“label-left”,labelWidth: 100},
{type:“newcolumn”},
{type:“label”, label:"",labelWidth: 10},
{type:“newcolumn”},
{type: “block”, inputWidth:500, list:[
{type:“label”, label:"",labelWidth: 10},
{type: “block”, inputWidth:480, list:[
{type:“select”, name:“orastart”, label:“Ora Inizio:”, position:“label-left”,labelWidth: 100,inputWidth:100, options:oraOption},
{type:“newcolumn”},
{type:“label”, label:"",labelWidth: 10},
{type:“newcolumn”},
{type:“select”, name:“orafine”, label:“Ora Fine:”, position:“label-left”,labelWidth: 100,inputWidth:100, options:oraOption}]},
{type: “block”, inputWidth:480, list:[
{type:“input”, name:“orapausa”, label:“Ore Pausa:”, position:“label-left”,labelWidth: 100,inputWidth:106},
{type:“newcolumn”},
{type:“label”, label:"",labelWidth: 10},
{type:“newcolumn”},
{type:“input”, name:“oretotali”, label:“Ore Totali:”, position:“label-left”,labelWidth: 100,inputWidth:106, readonly:true}]},
{type:“newcolumn”},
{type:“label”, label:"",labelWidth: 10},
{type:“newcolumn”},
{type: “input”, name: “dettaglio1”, position:“label-top”, rows: 2,inputWidth:450},
{type: “input”, name: “dettaglio2”, rows: 2, inputWidth:450},
{type: “input”, name: “dettaglio3”, inputWidth:450},
{type: “input”, name: “dettaglio4”, inputWidth:450},
{type: “block”, inputWidth:450, list:[
{type: “button”, name:“btnSalva”, value: “Salva”},
{type:“newcolumn”},
{type: “button”, name:“btnNuovo”, value: “Nuovo”},
{type:“newcolumn”},
{type: “button”, name:“btnCopia”, value: “Copia”},
{type:“newcolumn”},
{type: “button”, name:“btnCancella”, value: “Cancella”}
]}]}
];
dhtmlx.image_path = "codebase/imgs/";
dhtmlx.skin = "dhx_terrace";
dhxLayout = new dhtmlXLayoutObject("parentId", "3L", "dhx_terrace");
dhxLayout.cells("a").setWidth(800);
dhxLayout.cells("a").setText("Rapportini");
dhxLayout.cells("c").setText("Uscite non ancora rapportinate");
dhxLayout.cells("b").setText("Inserimento/modifica rapportino");
myForm = dhxLayout.cells("b").attachForm(formData);
mygrid = dhxLayout.cells("a").attachGrid();
mygrid.setImagePath("codebase/imgs/");
mygrid.setHeader("DATA, CLIENTE, PROGETTO,DETTAGLIO 1,ORE,STAMPA, CANCELLA");
mygrid.setInitWidths("100,*,*,*,40,80,80");
mygrid.setColAlign("left,left,left,left,left,left");
mygrid.setColTypes("ro,ro,ro,ro,ro,ro");
mygrid.setSkin("dhx_terrace");
mygrid.setColSorting("str,str,str,str,str,str");
mygrid.init();
var comboCli = myForm.getCombo("fcliente");[/code]
Everything work well, but the last call myForm.getCombo throws error ’ has no method getCombo’
Can you help me? I’m using the last version of DHTMLX Standard
thanks
Luca