How to create Combo Box in Grid cell/Column using code


Hello,



How to create Combo Box in Grid cell/Column using code and my data could be in JsArray or JSON. Please let me know yor thoughts.



Thanks,



RamaRao R.


Hello,


in case of using “co” type the data combo is initialized as follows:





grid.init();


var combo = grid.getCombo(columnIndex);


combo.put(key1,value1);…


combo.put(keyN,valueN);


if you use “combo” type, it’s possible to use addOption method of the dhtmlxCombo component to add options from js array:


grid.init();


var combo = grid.getColumnCombo(columnIndex);


combo.addOption([[key1,value1],…,[keyN,valueN]]);