Dropdownlist selected value not updating
Sure enough when stepping through the code I see that when an item is selected the actual model - model. But it's also a problem because the array is getting updated by multiple ASP.NET threads which likely would lead to odd crashes from time to time. In retrospect the modelbinding behavior makes perfect sense. Sign up for a free Git Hub account to open an issue and contact its maintainers and the community.By clicking “Sign up for Git Hub”, you agree to our terms of service and privacy statement.
It appears that the model binder on the [Http Post] method is actually updating the list that's bound to and changing the actual entry item in the list and setting its selected value.To avoid further frustration and the additional code required for syncing the model and widget, we will handle this discrepancy internally either with change in the widget behavior or with a custom value binding. So yeah the Model is god, but again MVVM..view should reflect the model, and the model should reflect the view yeah?Shouldn't have to worry about niggly little details like this, we just want it to work as one would expect. although i'm using angular, i constantly hit this problem all the time where what the dropdownlist shows as being selected is out of sync w/ ngmodel. lol With all these changes, now the widget can match the model state and we will not be forced to update the model automatically on load, which is "dead wrong".I updated the provided js Fiddle demo to demonstrate the suggested approach.If you would like to get an additional technical support on the subject, then I would like to point you to the two available options: Generally speaking, the model should be the single source of truth and the UI needs to be synced to it on initial load.