combobox (common controls) data display
-
I've just met the Common Controls combobox and it is starting off like an awkward blind date. My issue is that when the record/row changes in the underlying dataset,the combobox's Text property only properly updates and displays (DisplayMember text) when the ValueMember(key value) changes. If the record/row changes and the ValueMember value remains the same, then the combobox Text displays the ValueMember value rather than the DisplayMember text. I've massacred the terminology here and I apologize, but I'm hoping the general problem gets through and that before I apply the workaround plasters, there is a simple, conventional solution I'm missing. Here is the combobox code:
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
Me.TblLocationTableAdapter.Fill(Me.DbPropertiesBEDataSet.tblLocation)With LOCATIONIDComboBox .DataBindings.Add("SelectedValue", Me.TblPropertiesBindingSource, "LocationID") .DataSource = DbPropertiesBEDataSet.tblLocation .ValueMember = "LocationID" 'primary key .DisplayMember = "LocDesc" 'related text End With