Databinding in multiple ComboBoxes
Posted on 2005-03-18
I am developing a windows application for booking courses. On the main input form the user inputs applicant name etc. He/she then has to select the course. The course selection is in two parts via two comboboxes. The first combobox is the course ID from a 'Course Template' table in the dataset. the second is the dates related to each course from a 'Courses' table in the dataset. Each of these comboboxes are also connected to the main course booking record using databinding - this is so that, when the booking record is selected, it displays the correct course and date.
I can get the Course Template combobox populated. The problem I have is with the Courses (i.e. the Dates) combobox. I can not work out how to program it so that it only shows the relevant dates for the particular course - and to change the listing on reselection of the Course Template combobox.
I have tested this using a datagrid using data relations but can not see how to do the same thing with a combobox.
Can anyone advise please (code snippet would be helpful)