help binding a dataset

J

Jake Smythe

Hello,


I have a dataset that contains companyid, company name, projectid,
project name. I want to bind the dataset to two combo boxes and make the
second dependant on the first. So the first combo box would contain the
companies and depending on what the user selected the second combo box would
populate just the projects for that company. How would I go about doing this
with the one dataset? How would I avoid repeating company names in the first
combo box, if this is possible? Thanks in advance.

Jake
 
G

Guest

Jake said:
Hello,


I have a dataset that contains companyid, company name, projectid,
project name. I want to bind the dataset to two combo boxes and make the
second dependant on the first. So the first combo box would contain the
companies and depending on what the user selected the second combo box would
populate just the projects for that company. How would I go about doing this
with the one dataset? How would I avoid repeating company names in the first
combo box, if this is possible? Thanks in advance.

Jake

I would keep the data in two seperate datatables (both of which can be
in the dataset, but that isn't important) Then bind one combobox to one
table and use the selectionchange event to bind the second using
datatable.select to fill in the second.

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top