try { con = new SqlConnection("Data Source=.;Initial Catalog=DSIIDC2;Integrated Security=True"); con.Open(); string str = "select * from addcaasedetails"; SqlDataAdapter da = new SqlDataAdapter(str, con); DataSet ds = new DataSet(); da.Fill(ds); foreach (DataRow row in ds.Tables[0].Rows) { if (ds.Tables[0].Rows[1]["caseno"] == comboBox1.SelectedItem && ds.Tables[0].Rows[1]["caseno"]==comboBox2.SelectedItem) { dataGridView1.Visible = true; } } } catch (Exception ex) { MessageBox.Show(ex.Message); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)