I'm having great fun with using a combobox to update other fields. The combobox is bound to a main dataview via the SelectedValue, and the Datasource, DisplayMember and ValueMember are all set, apparently correctly.
The idea is that one of the values in the combobox is a default, 'unchosen' value. When a different value is chosen, one of the other fields in the main table is set to the current date and time.
However, it seems that merely changing the chosen option in the combobox does not update the underlying dataview until focus is switched to the other field. The SelectedValue changes but the field value does not.
If I add a line of code to update the Value of the Date field for the current row, it appears to refresh immediately all the row's bindings and restore the 'unchosen' value to the combobox. It does not allow selecting another value. If I change the combobox to a listbox with identical properties, I am able to see the new option being chosen when I hold the mouse button down, and immediately reset when I release it.
If I leave the field-updating line of code out, I am able to select from the combobox normally.
Any ideas?
The idea is that one of the values in the combobox is a default, 'unchosen' value. When a different value is chosen, one of the other fields in the main table is set to the current date and time.
However, it seems that merely changing the chosen option in the combobox does not update the underlying dataview until focus is switched to the other field. The SelectedValue changes but the field value does not.
If I add a line of code to update the Value of the Date field for the current row, it appears to refresh immediately all the row's bindings and restore the 'unchosen' value to the combobox. It does not allow selecting another value. If I change the combobox to a listbox with identical properties, I am able to see the new option being chosen when I hold the mouse button down, and immediately reset when I release it.
If I leave the field-updating line of code out, I am able to select from the combobox normally.
Any ideas?