Repetitive Dataset Sorting
Posted on 2004-10-04
I have a Dataset that draws everything from one table. I'll call this dataset_test.
In dataset_test is the table "TestTBL"
In the TestTBL table are the columns "ColFirst", "ColLast", and "ColID"
I have 4 combo boxes. One sits on top, the other three are below. These three lower ones all occupy the same space. The options in the first combo box are:
First Name, Last Name, Employee ID
Depending on which is chosen, one of the three lower boxes is made visible (and the other two invisible). These three are directly datasource and datamember'd to ColFirst, ColLast, and ColID in the TestTBL table in the dataset_test dataset. However, each time one of the three options is chosen in the first combo box, I want the newly visible combo box to be sorted alphabetically, such that when last name is chosen, the last names appear in the lower combo box alphabetically (the default), when First Name is chosen, rather than they appear in the same order as the last names (due to the databindings), the dataset is reordered for first names, and the same for Employee IDs.
How do I do this?