I am creating an empty grid with three columns. The columns types are defined by
mygrid.setColTypes(“ed,ed,coro”);
Then in response to user input I add rows via
mygrid.addRow(newId,“XXX,00116”,mygrid.getRowsNum())
How can I set the coro column to be a list box with four values? Is this done when I initialize the grid or when the row is added? What is the syntax?
Many thanks
How to manipulate with “coro” eXcell type please see more information here dhtmlx.com/docs/products/dhtmlxG … _selectbox
Hello,
yes, you can change the colunm type after grid intialization.
Try to use setCellExcellType method. For example:
function setType(id){
mygrid.setCellExcellType(id,0,“coro”);
})
…
mygrid.addRow(newId,“XXX,00116”,mygrid.getRowsNum())
mygrid.forEachRow(setType);
var c = mygrid.getCombo(0);
c.put(key_1,text_1);
c.put(key_2,text_2);
…
Please, see dhtmlx.com/docs/products/dhtmlxG … alpha.html for more details