When i select the item in jqxcombobox and submit the form, jqxcombobox formcontrol returned value is displayMember (code) value, not the valueMember (id) value.
In My Component i have used jqxcombobox
<jqxComboBox [width]='150' [height]='23' [source]='categoryAdapter' [valueMember]="'id'" [displayMember]="'code'" formControlName="category_id"></jqxComboBox>
and Defined the source as :
this.categorysource =
{
datatype: "json",
datafields: [
{ name: "id"},
{ name: "code"},
],
id: "id",
url: this.apiUrl+"product_category?limit=all"
};
this.categoryAdapter = new jqx.dataAdapter(this.categorysource);
Category Api Returns Data as:
data:[
{id: 1, code: "SG1108", name: "GH470"},
{id: 3, code: "LA1239", name: "GH471"},
{id: 4, code: "MO3420", name: "GH472"}
]