I have a combobox created using
var values = new Array(“A”, “B”, “C”, “D”)
$(“#jqxComboBoxFundCategory”).jqxComboBox({ source: values, checkboxes: true, width: 250, height: 25 });
and I save the data with
$(“#jqxComboBoxFundCategory”).on(‘close’, function (event) {
if (event.args) {
var item = event.args.item;
if (item) {
var items = $(“#jqxComboBoxFundCategory”).jqxComboBox(‘getCheckedItems’);
var checkedItems = “”;
$.each(items, function (index) {
checkedItems += this.label + “, “;
});
}
save_combo_values(‘FundCategory’, checkedItems);
}
});
The data is in the database fine.
When I try to load the data back I use,
var FundCategory = “A,C”
var str_array = FundCategory.split(‘,’);
for (var i = 0; i < str_array.length; i++) {
// Trim the excess whitespace.
str_array[i] = str_array[i].replace(/^\s*/, “”).replace(/\s*$/, “”);
// Add additional code here, such as:
$(“#jqxComboBoxFundCategory”).jqxComboBox(‘selectItem’, str_array[i]);
}
Nothing get populated. What am I doing wrong?
Thanks