I set a combo in a form.
On the other hand, I set a group of options of combo.
Due to the the options are come from combo connector.
Now I have two group usage. One is a combo in a form and other is a group of options of combo.
Now I want to ask how put the combo connector options into a combo in a form ?
I try run itself. Two is work. Form combo is ok. Alone combo options is ok.
How combione them ?
The below combo is in a Form
{
type: "combo",
label: "Table Type :",
name: "tabletype",
validate: "ValidAplhaNumeric",
labelWidth: 150,
inputWidth: 150
},
The below combo is alone.
{
var grid_Action;
var rowID = 1;
var value;
var combo = new dhtmlXCombo("combo_zone3", "alfa3", 200);
combo = frmMain.setValue("tabletype");
var sqlString;
grid_Action = new dhtmlXGridObject('gridbox');
sqlString = "GridConnector.ashx?strSQL=SELECT * FROM TESTING_TREE ";
grid_Action.setHeader("id, parent_id, text");
grid_Action.init();
grid_Action.loadXML(sqlString);
// combo.loadXML("ComboConnector.ashx?strSQL=SELECT * FROM TESTING_TREE ");
// combo = grid_Action.getColumnCombo(2);
var arr = [], value;
alert("testing ok !");
grid_Action.forEachRow(function (id) {
value = grid_Action.cells(id, 1).getValue();
arr.push([id, value]);
});
combo.addOption(arr);
};