Hello, I have a C # application using Windows Forms
My question would be as follows. I have a database made in Access It contains 2 tables, a table called State, which contains Code and State and another table called Cities, which contains Code, State and City.
Remembering that I have 2 combobox, the first combobox is populated with the data from the State table, using bindingsource, until everything is right, it appears all the status codes. The question I have would be the following, I wanted to make a relationship between combobox 1 and 2, and 2 will show all cities, according to the state selected, but in bindingsource, does not have a filtering option, and I'm not sure how to put it.
Using a search in the database will exit this method:
SELECT Cidade FROM Cidades WHERE Estado='" + sel_UF + "'
I have read some topics on the internet and some here also in stackoverflow, but I could not heal my doubt, in which he talks about putting something related inside the event:
SelectedValueChanged
If someone can give me a light there, thank you in advance