ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Pre-fill textbox on single lookup selection
Title:
B
I
{code}
?
I have a lookup containing some values. I want to set a textbox text based on the selected value. Using jquery if I am selecting the value of lookupId ($('#lookup1').val()). but In this case I am getting the id of record instead of name of record, I want name of record
Save Changes
Cancel
SalesARM
asked at 20 Feb 2019
Answers
B
I
{code}
?
you have 2 options, 1) either use the `id` value that you got using `$('#lookup1').val()` and make an ajax request to the server to get the name, 2) handle the lookup `aweload` event, after the change the lookup makes an ajax request to the server to get the caption and after that the `aweload` event triggers so you could do this: $('#MealLookupDropdown').on('aweload', function() { var caption = $('#MealLookupDropdown').closest('.awe-field').find('.awe-caption').html(); console.log(caption); });
Save Changes
Cancel
Omu
answered at 20 Feb 2019
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