I have two comboboxes.
Now I want to select data from database based on the two combobox value.
For example combobox1 = 1001
, then I need to select data between these two values.
Actually I wrote code to get value from database.
The code for
private void comboBox2_SelectedIndexChanged(object sender, EventArgs e)
MessageBox.Show("From should not be empty");
comp.FROM = Convert.ToInt32(comboBox4.Text);
MessageBox.Show("To Should not be empty");
comp.TO = Convert.ToInt32(comboBox5.Text);
DataTable result = inter.getapplicationinformationstage1(comp);
dataGridView1.DataSource = result;
But when I select data from
, it automatically calls the event even I am not selecting the
value and when I select any value from any one of combobox, then that value automatically set into another combobox.
How can solve this ?
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)