views:

17

answers:

1

Hello

I am trying to syncronise the selectedvalue of a combobox when navigating through records. Setting the combobox.selectedvalue doesnt work. I have tried refreshing the combobox but that doesnt work either. The combobox is databound.

Any ideas?

A: 

If your ComboBox is data-bound (i.e. you've properly set its DataSource property), then you also need to make sure its DisplayMember and ValueMember properties are set to the correct fields.

MusiGenesis
Yes, the combobox actually has 4 properties, The datasource, the display member, the values member and the selected value. All are set correctly. Navigating through the records causes the selected value to randomly fail, so the combobox shows a blank value instead of the selected value. When I check the bindingsource, I see that the value is missing in the binding source - when I check th database I see the value is in the database. This error occurs randomly.
greg