Hi,
Please help me to keep going.
I have a grid with the following column types.
mygrid.setColTypes("cntr,combo,dhxCalendarA,mynum,ed,combo,ro,ro");
How can I populate the combo selection which is in 2nd and 6th columns when I am not suppose to use xml file to have the
selection items.
I need to have this dynamic based on the row.
If the row = 1 then combo in the column 1 must be filled with some selected items
If the row other than one then the combo will be filled with some other items
I have included dhtmlxcombo reference and have the following code but it does not populate the combo.
I don't see any items in the selection combo when I click on it.
This is how I attach the function to the grid.
mygrid.attachEvent("onEditCell",myf);
function myf(stage,id,index){
var ind=mygrid.getRowIndex(id);
if ((index==1)&&(stage==0))//start edit Shipping column
{
var combo=mygrid.getCombo(1);
if (ind%2==1){ //for even rows
combo.save(); //save initial state
combo.put(1,"1");
combo.put(1,"2");
combo.put(1,"3");
}
else{
combo.save(); //save initial state
combo.put(1,"1");
combo.put(1,“2”);
combo.put(1,“3”);
}
}
if ((index==1)&&(stage==2)) //for finishing edit
mygrid.getCombo(1).restore(); //restore combo state
return true;
}
What is wrong? I have access to a demo but the combo is loading its data from xml file.
Thanks,
Biju