Problems with Bound Combobox VS.NET - Cannot select item
Posted on 2007-11-27
I have a bound combobox on a form. The combobox is populated from another table. Here is code for populating:
I have tried both this:
Dim dvClients as new Dataview(me.fEdge_Dataset.tblOrganization)
me.ccClientInfoCombobox.DataSource = dvClients
me.ccClientInfoCombobox.DisplayMember = "pkOrganizationID"
me.ccClientInfoCombobox.ValueMember = "OrganizationOwnerName"
Me.CcClientInfoComboBox.DataBindings.Add(New System.Windows.Forms.Binding("Text", Me.Gen_AppraisalMainBindingSource1, "ccClientInfo", True))
Me.CcClientInfoComboBox.DataBindings.Add(New System.Windows.Forms.Binding("SelectedValue", Me.Gen_AppraisalMainBindingSource, "ccClientInfo", True))
Me.CcClientInfoComboBox.DataSource = Me.TblOrganizationBindingSource
Me.CcClientInfoComboBox.DisplayMember = "OrganizationOwnerName"
Me.CcClientInfoComboBox.ValueMember = "pkOrganizationId"
pkOrganizationalID is an identity number.
Organizationownername is a text value.
The box populates with no problem. I can select a value with no problem. I then cannot leave the combobox.
If I type in a numeric value in the box, I can leave the combobox and populate others. Alternately, if I change the display member to the ID value in my code, I can select a value and leave the box.
This has me baffled. Any help at all is appreciated.