Usage example (populated with data from DB)

With the new sample in the DataStore documentation (nice sample!) I tried two syncronize the combo with a new datatable for departments in order to fill the combo with dynamic records.

I’ve added


to populate with data (worked) and tried to add the option value “all” to the to of it in order to “reset” filtration with

var myCombo = new dhtmlXCombo(“box2”,“combo1”,295);
myCombo.setComboText(“Filter by department”);

But “All” is not being added. How do I have to add here an option value?

Furthermore I tried to add the same dataStore to a combo in the form (instead of the text field) but haven’t found a suitable sample how to define the combox within the form.

{type: “block”, list:[
{type: “label”, offsetTop:8, label: “Department”},
{type: “combo”, name:“Department”, inputWidth: 160}

How do I add a dataStored combo with this form? Thanks for any help.

But “All” is not being added.

If a combo is synchronized with a datastore, all options are got from this datastore and the new value should also be added to the datastore.

How do I add a dataStored combo with this form

var combo = form.getCombo(“Department”);