Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by LeitrimMan on Dec 03, 2009 16:00
open dhtmlx forum
Load a CO (select) from XML / Database

Hi Guys,

I can't seem to find the answer to this issue..

I have a CO Select box in a grid, that I want to populate wtih values from a database (so that user can add new rows based o these values). I can manually load using combo.put like in the code below, however I need to be able to load this dynamically from a database table.. is there a way I can do this, i.e. through a loadXML or a connector or something?

Current Code -

crewTasks.addRow(27000, ["",""]);
var combo = crewTasks.getCustomCombo(27000,0);
combo.put(1,'Toursteel'); //test combo manually
Answer posted by Stanislav (support) on Dec 04, 2009 00:34
If you are using connectors - grid will make attempt to load combo options automatically ( co and coro columns in the grid )
It can be controlled by set_options settings in the connector's code 

http://dhtmlx.com/dhxdocs/doku.php?id=dhtmlxconnector:select-box_columns_in_grid

Inside connector's package , there are two related samples
samples\grid\06_combo.html 
samples\grid\06a_combo.html 

Be sure to use the latest version of connectors.
Answer posted by Cyril on Dec 04, 2009 07:19
Perfect, thanks that worked/