Hi,
I have a form with 2 comboboxes and one datagrid. I want to use these 2 comboboxes to filter the information from datagrid.
I have in the first combo all countries from table country
in the second one: all cities from the country that is selected in the first combo (table city)
I want in the grid to see all clients from a city that I select in the second combo.
my tables are: country, city, client
until now I can see in the grid all my records without filter. I used dataset and dataadapter and relations but I dont know where should I put WHERE clause.
in my dataadapter i have (select * from country)for every of them
in relation: ds.Relations.Add("country_id", ds.Tables!country.Columns!country_id, ds.Tables!city.Columns!country_id)
("select city from city inner join country on country.country_id = city.country_id where country.country = '" & Me.cboCountry.SelectedItem & "'")
thanks!
I have a form with 2 comboboxes and one datagrid. I want to use these 2 comboboxes to filter the information from datagrid.
I have in the first combo all countries from table country
in the second one: all cities from the country that is selected in the first combo (table city)
I want in the grid to see all clients from a city that I select in the second combo.
my tables are: country, city, client
until now I can see in the grid all my records without filter. I used dataset and dataadapter and relations but I dont know where should I put WHERE clause.
in my dataadapter i have (select * from country)for every of them
in relation: ds.Relations.Add("country_id", ds.Tables!country.Columns!country_id, ds.Tables!city.Columns!country_id)
("select city from city inner join country on country.country_id = city.country_id where country.country = '" & Me.cboCountry.SelectedItem & "'")
thanks!