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??