To define options of combo you should use ComboConnector on the server side and specify the connector file in the load() method on the client side:
client side:
var combo=new dhtmlXCombo("combo_zone2","alfa2",200);
combo.load("connector.ashx");
server side:
dhtmlxComboConnector connector = new dhtmlxComboConnector(
"Categories", //table to select from
"value_column, label_column", //fields to select
"category_id", //primary key column name
dhtmlxDatabaseAdapterType.SqlServer2005, //predefined database adapter type
//connection string
ConfigurationManager.ConnectionStrings["SamplesDatabase"].ConnectionString
);
dhtmlxComboConnector connector = new dhtmlxComboConnector(
"Categories", //table to select from
"id,firstName AS label", //fields to select
...
Note, in the filtering mode a combo filters data by the "label" field.
Back to top