Hello,
I have a ComboBox and I’d like it to show the saved value when the form is opened but the getItemByValue method returns “undefined”. I’ve verified value supplied exists in the list. What am I missing here?
var source =
{
datatype: “json”,
contentType: “application/json; charset=utf-8”,
type: “POST”,
datafields: [
{ name: ‘Grade’ },
{ name: ‘GradeDesc’}
],
url: BusinessData_WEBSERVICE_URL + “GetGradeNames”,
data: {
featureClass: “P”,
style: “full”,
maxRows: 12
}
};
var dataAdapter = new $.jqx.dataAdapter(source);
$(“#jqxcombobox_MaterialGrades”).jqxComboBox(
{
width: 250,
height: 25,
source: dataAdapter,
autoComplete: true,
theme: theme,
selectedIndex: 0,
displayMember: “GradeDesc”,
valueMember: “Grade”
});
var item = $(“#jqxcombobox_MaterialGrades”).jqxComboBox(‘getItemByValue’, ‘G10260J29’);
$(“#jqxcombobox_MaterialGrades”).jqxComboBox(“selectItem”, item);