ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Autocomplete on select get all properties of item
Title:
B
I
{code}
?
Is there a way to get all the attributes of the selected item in Autocomplete? My json looks something like this: [{ k:'some_id', c:'some_description', x:'coord_X', y:'coord_Y', year:2019 }] PropId does not help me very much.
Save Changes
Cancel
Kovacs Stefan
asked at 26 Nov 2019
with `PropId` you get the `id`, and using that you can you can query the whole list to find the entire item
at 26 Nov 2019
Omu
So basically I need to use .DataFunc("getData") to save the whole list, and .PropID to set the value in a hidden input, and with change event on the hidden input to get the id and find the selected?
at 26 Nov 2019
Kovacs Stefan
you could do that, or make a remote call, with the aucomplete the user might not always select the value from the list, you could have the text value matching an id but the propId will be null, because the user didn't select from the list, your best bet would be to query by the text value, you could also consider using a combobox with remote search: https://demo.aspnetawesome.com/AjaxRadioListDemo#oremotesearch
at 26 Nov 2019
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK