grid with combo

hi

I would like to create a combo (for the whole column of the grid) with the possibility to set the options (choices) directly in the code… there is the way to store the value of the combo in array ?

I have tried in various ways but the choices in the combo are taken from the values ​​in the grid… :imp:

mygrid = new dhtmlXGridObject("gridbox");
mygrid.setColTypes("ed,ed,ed,co,ed");
...
mygrid.init();
combo = mygrid.getColumnCombo(3);

the alternative way is the data.xml, but where is te structure of xml ?
in this way I load the xml with

combo.loadXML("data.xml");

thanks

Please, try to use the following code:
combo = grid.getCombo(index);
combo.put(value,label);

docs.dhtmlx.com/doku.php?id=dhtm … n_from_xml

code doesn’t work

TypeError: combo.put is not a function

the js imported are

<script type="text/javascript" src="codebase/dhtmlxcombo.js" ></script>
<script type="text/javascript" src="codebase/ext/dhtmlxcombo_group.js"></script>
<script type="text/javascript" src="codebase/ext/dhtmlxcombo_extra.js"></script>
<script type="text/javascript" src="codebase/excells/dhtmlxgrid_excell_combo.js"></script>

....
<script type="text/javascript">

mygrid = new dhtmlXGridObject("gridbox");
mygrid.setImagePath("codebase/imgs/");
mygrid.setHeader("id, parentID, entryName, value, minValue");
//mygrid.setColumnIds("id, parentID , entryName , value, minValue");
mygrid.setColAlign("left,left,left,left");
mygrid.setColTypes("ed,ed,ed,coro,ed");
mygrid.setColSorting("int,int,char,char,int");

mygrid.setSkin("dhx_skyblue");
mygrid.init();

combo = mygrid.getColumnCombo(3);
combo.put("A","1");

mygrid.loadXML('connectorSqlite3.php');

var dp = new dataProcessor('connectorSqlite3.php');
dp.init(mygrid);
</script>

Thanks

not a
combo = mygrid.getColumnCombo(3);

but
combo = mygrid.getCombo(3);

getColumnCombo() method - for “combo” exCell
getCombo() method - for “co”/“coro” exCells

Hi,
code doesn’t work :frowning:

ReferenceError: grid is not defined

var mygrid = new dhtmlXGridObject("gridbox");
....
mygrid.setColTypes("ed,ed,ed,co,ed");
mygrid.setColSorting("int,int,char,char,int");
...
mygrid.init();

combo = grid.getCombo(3);
...
mygrid.loadXML('connectorSqlite3.php');

[code]var mygrid = new dhtmlXGridObject(“gridbox”);

mygrid.setColTypes(“ed,ed,ed,co,ed”);
mygrid.setColSorting(“int,int,char,char,int”);

mygrid.init();

combo = mygrid.getCombo(3);

mygrid.loadXML(‘connectorSqlite3.php’);[/code]