jQuery UI Widgets › Forums › Angular › jqxcombox doesnot set valueMember
Tagged: angular 4, jqxComboBox
This topic contains 9 replies, has 3 voices, and was last updated by Ivo Zhulev 5 years, 10 months ago.
-
Author
-
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"} ]
Hi gudboisgn,
We will check that. Get the value with the
getSelectedItem
method for now.Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/Thank You! Ivo Zhulev
How can we refresh/reload combobox data.
Hi gudboisgn,
Just set the source again with the new data.
Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/I want combobox to act like autocomplete which shows option when i type minimum of two character.with filter option
hi, Ivo Zhulev
How to set the source again with the new data, as data comes from api url defined in source.url;
I could not get you,Hi CodeHelp,
By default, the
jqxComboBox
has autocomplete. What do you mean byfilter option
?Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/Hi gudboisgn,
Well, If you get the data from URL, then try with just
dataAdapter.dataBind()
.Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/i Mean to say the autocomplete should work only when i type 2 character.less than 2 character it should not work
Hi CodeHelp,
You can’t change the default behavior of this currently.
Best Regards,
IvojQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.