I need my select options to have a value because I'm posting the form back to the server and asp.net mvc is going to need to know the value. If I bind and set 'value' to be the instance of an object, which I want to do because other bindings read from the selected objects values, then the options have no html value attribute. The value attribute is what is needed when the form is submitted. If I set the optionsValue and point it to the id of the item then it overrides my value binding and I get errors that the object doesn't have the properties I've bound to.
I can set this up with read/write options on a computed type but I was wondering if there isn't a simpler way.
thanks,
Options have no value;
<select data-bind="options: $root.meetingEvents,
value: $data.meetingEvent,
optionsText: 'meetingEventName',
optionsCaption: ' '">
Options have value but when selected it's the meetingEventId that is pushed into value and therefor doesn't have the other properties which I have other controls bound to.
<select data-bind=" options: $root.meetingEvents,
value: $data.meetingEvent,
optionsText: 'meetingEventName',
optionsValue: 'meetingEventId'
optionsCaption: ' '">