Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

VB.Net: Populating comboboxes from data source

I have a couple of instances where I have a comboboxes menu in VB.Net, and I've bound it to a Binding source, which, in turn, is bound to an ".xsd" file, which defines a SQL-Server-based dataset.

I have two adjacent comboboxes, both with virtually the same arrangement of data bindings, and one populates, the other does not.  From the dataset designer, both queries work perfectly, giving me the results I expect.  As an experiment, I unchecked the box on both comboboxes that says "Use Databound items" and then re-established the datasets on both.  As before, the first resumed working and other resumed providing me with an empty list.  

I thought it time to get some advice on this.  Dropdowns have been a headache for me for a while.  Thanks, ~Peter Ferber
0
PeterFrb
Asked:
PeterFrb
1 Solution
 
CodeCruiserCommented:
Are both bound to same dataset and binding source or separate?
0
 
ElrondCTCommented:
If you stop the application with the debugger, does the dataset for the empty combobox have data, or is it empty?
0
 
sognoctCommented:
without your code is impossible to give some help, can you attach here the form source ?
0
 
PeterFrbWeb development, Java scripting, Python TrainingAuthor Commented:
Thanks for your comments.  I was able to solve the problem myself, on my office computer.  I don't have that in front of me at the moment, but I can describe what I did to solve the problem.  When I get back to the office, I can post some code.

The problem had to do with using the combobox itself as a data source instead of the data file.  Also the form needs a "Fill" statement to feed the control from the data source.  Those pieces were in place for one control, but not the other.  When I got through this, my dropdowns worked perfectly.

~Peter
0
 
PeterFrbWeb development, Java scripting, Python TrainingAuthor Commented:
I ended up solving the problem myself.  Thanks for the help, though.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now