Solved

Problems with Bound Combobox VS.NET - Cannot select item

Posted on 2007-11-27
7
307 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
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…

760 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

20 Experts available now in Live!

Get 1:1 Help Now