Solved

Problems with Bound Combobox VS.NET - Cannot select item

Posted on 2007-11-27
7
308 Views
Last Modified: 2013-11-26
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"

and this:
==================================================
        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.

Vee
0
Comment
Question by:VeeVan
  • 3
  • 2
7 Comments
 
LVL 11

Expert Comment

by:AkisC
ID: 20360393
A time saver rule of thumb I have come up, working with microsoft products, is...
When I face peculiar behavior with controls, the first thing I do, is DELETE the control, save the form, close my App and re-open it again. THEN I create another control and if possible (few ajustments in my code) I give it another name...
0
 
LVL 1

Author Comment

by:VeeVan
ID: 20361612
I have deleted and recreated it more times than I can count. I followed your exact instructions and still the same result. There MUST be something I am doing wrong, but can't figure it.
0
 
LVL 11

Expert Comment

by:AkisC
ID: 20361692
Ok.
From the built menu
click ->Clean Solution
-then-
->RE-building solution (not built)

I hope I am not waisting your time, bacause I find no reasoning in the error you get. The code looks ok.
0
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
LVL 1

Author Comment

by:VeeVan
ID: 20361926
Yeah... I have cleaned many many times.
I found the solution.

There is another person who had this issue: here is the link on EE.
http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_21724117.html?sfQueryTermInfo=1+bound+combobox

The way I fixed it is I manually went into the databindings for the combobox, and made sure that all databindings were set to "none". Then I manually selected the "Selected value" for the item in the ds that I wanted. For whatever reason.... it worked. And is working now. Thanks for your help and assistance. D**N those stupid MS gizmos.
0
 
LVL 11

Expert Comment

by:AkisC
ID: 20364137
Nice you got it working

Have fun coding...
0
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 20615323
PAQed with points refunded (500)

Computer101
EE Admin
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The viewer will learn how to use NetBeans IDE 8.0 for Windows to connect to a MySQL database. Open Services Panel: Create a new connection using New Connection Wizard: Create a test database called eetutorial: Create a new test tabel called ee…
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now