Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by haritha on Sep 26, 2008 03:24
open dhtmlx forum
combobox

Hi,

I am using html table to display the data in the grid. Now i want one column as combo box. The values in the combo box should come from jsp file.
Can you please help me in this issue.

Thanks
haritha
Answer posted by dhtmlx support on Sep 30, 2008 08:40
Which grid edition do you use ?

In case of PRO combo excell is available. It allows to load data from xml stream.

loadCombo(){
    combo = grid.getColumnCombo(index);

    combo.loadXML(url)
}

If you have standard version, options of "co" or "coro" column can be added using put(key,value) method:

loadCombo(){

   
    combo = grid.getCombo(index);
   
    combo.put(..,..);
...  
  
}
In this case combo options values should be gotten before put methods are called (you should use own approach to load this values).

 loadCombo() method should be called inside oninit attribute

<table name="grid" class="dhtmlxGrid" oninit="loadCombo()" ...>