Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by haritha on Sep 25, 2008 02:19
open dhtmlx forum
Combo box in html table

Hi Support,

I initialized the grid using html table. i want to get combobox in every row for one column. the values in the combo box has to come from server side.

when ever i add a row there should be combo list in that column. Please give sample code which solves my problem

Thanks in advance
haritha
Answer posted by dhtmlx support on Sep 26, 2008 07:27
You can set "co" type for the column:

<cell type="co">..

Using getCombo(column_index) you can get combo object. Then options' values can be palced to the combo (after combo initialization):

<script>
...
var grid = new dhtmlXGridFromTable(...);
....
var c = grid.getCombo(index);
c.put(value1,text1);
c.put(value2,text2);
...
</script>