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); for (int i = 0; i < ds.Tables["addcaasedetails"].Rows.Count; i++) { if (ds.Tables["addcaasedetails"].Rows[i]["caseno"] == casedetails.ValueMember) { dataGridView1.Visible = true; } } } catch (Exception ex) { MessageBox.Show(ex.Message); }
if (ds.Tables["addcaasedetails"].Rows[i]["caseno"].ToString() == casedetails.ValueMember) { dataGridView1.Visible = true; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)