How can I get the fields shown on the database to change depending on what is selected on the combobox?
Thanks
Asked
Active
Viewed 686 times
0

Erik A
- 31,639
- 12
- 42
- 67

user3287552
- 45
- 6
-
are you trying to sort the dgv? – Index Nov 30 '14 at 20:10
1 Answers
1
many ways to do this but i guess bindingsource would be the easiest.
just bind the grid to your datasource using a Bindingsource
then u can filter like
MyBindingSource.Filter = "Forename = Walter"
so with your Combobox it should look like
MyBindingSource.Filter = "Forename = " & ComboBox1.SelectedValue & ""
and to clear the filter
MyBindingSource.RemoveFilter()

Nocturnal
- 386
- 2
- 8