Hi,
I have a code snippet here, but the data isn't from the datagrid. This one is kinda simple. Hope it will help you to come up with the good logic.
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
if (cboCountry.Text == "Philippines")
{
cboProvince.Items.Clear();
cboProvince.Items.Add("Batangas");
cboProvince.Items.Add("Manila");
}
else if (cboCountry.Text == "Japan")
{
cboProvince.Items.Clear();
cboProvince.Items.Add("Kyoto");
cboProvince.Items.Add("Tokyo");
}
else if (cboCountry.Text == "South Korea")
{
cboProvince.Items.Clear();
cboProvince.Items.Add("Seoul");
cboProvince.Items.Add("Busan");
}
}
This kind of code isn't wise to use for larger data. But I'm just giving you the logic. It's up to you on how you will come up with your solution.
You know, coding with a little help from others and you coming up with more good solution is such a great feeling. Hope it helps. :)