سلام .
من برای دکمه ی سرچم این کدو نوشتم . ولی بعد از زدن دکمه ی سرچ DataGride خالی میشه . اشکالش کجاست .
ممنون.



SqlConnection con = newSqlConnection();
SqlCommand cmd = newSqlCommand();
SqlDataAdapter da = newSqlDataAdapter();
DataTable dt = newDataTable();
con.ConnectionString =
global::WindowsFormsApplication1.Properties.Settings.Default.db1ConnectionString;
cmd.Connection = con;
cmd.CommandText =
"SELECT * FROM Table1 where [bname] like N'%" + textBox1.Text + "%'";
da.SelectCommand = cmd;
da.Fill(dt);
this.dataGridView1.DataSource = dt;
this.dataGridView1.DataMember = "bname";
this.dataGridView1.AutoGenerateColumns = true;
this.dataGridView1.RightToLeft = RightToLeft.Yes;
this.dataGridView1.Refresh();
dt.Dispose();
da.Dispose();
cmd.Dispose();
con.Dispose();