469,341 Members | 6,291 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,341 developers. It's quick & easy.

Combo Box and Binding Issue

I have a form which is bound to a dataset. I am filling the forms dataset on Form_Load event.

On my form I have combo boxes which I am setting by running a stored procedure to return a datatable, which I then assign to the datasource.

Some of my combo box datasources depend on values in other fields to limit the options.

For example, I have a sales rep list that is limited by the customer selected in the customers combo box.

And here's the problem.....if I try to set up the combo boxes before I fill the dataset for my form, then the customer combo boxes selected value, which is bound to a field in my dataset is not yet set and the sales rep list is therefore not going to work.

But if I set the sales rep combo box data source after filling the forms dataset and hence I can pick up the customer id from the customer combo box, the sales rep combo boxes selected value, which is bound to another field in my forms data source, is not reflected.

In other words if I bind the selected value of a combo box to a field in the forms datasource (by filling the forms dataset) before populating the combo boxes datasource, it does not set the selected value in the list (as no list data was present on binding)

But I can't fill the combo box first because I need the customer ID from the customer combo box before I can create the data source for the sales rep combo!

Can anyone help me??
Mar 11 '08 #1
0 1677

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by kk | last post: by
1 post views Thread by Daniel | last post: by
2 posts views Thread by SoftWhiteDelgiht | last post: by
4 posts views Thread by Steve | last post: by
3 posts views Thread by Bill | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
reply views Thread by suresh191 | last post: by
1 post views Thread by haryvincent176 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.