ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Options for setting Odropdown Value from url call
Title:
B
I
{code}
?
I'm currently setting the initial value on an Odropdown control using a viewmodel string value (and razor) in the view. I see the example http://demo.aspnetawesome.com/AjaxRadioListDemo#Set-value-from-get-items-call where the value is set using Json for a new `AweItems` object from the controller, but I'm not getting it to work with a dropdown that's not in paired with a parent control. If that's possible, how would it be done? Potentially the problem I have in my (real) solution is I'm trying to use a Guid for the Value (Object)? Demos use Int.
Save Changes
Cancel
Stephan
asked at 21 Mar 2017
try this: open `AwesomeMvc.js` find `JSON.stringify` and replace it with: function (val) { if(typeof val === 'object') { return JSON.stringify(val); } return val; }
at 23 Mar 2017
Omu
Can use Guids now. Will that become part of the distributed js or something I need to modify in updates?
at 23 Mar 2017
Stephan
next version will have that, but for 5.0 you need to modify
at 23 Mar 2017
Omu
I am looking to update from 5.0 to the latest version of awesome, was wondering if GUID fix made into the release?
at 16 Aug 2018
Stephan Luis
yes, of course, there has been more than one release since then
at 16 Aug 2018
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