سلام
اين هم کامل با سورس خودتان (اصلاح شده):
اولي:
if (textBox1.Text.Length > 0){
job = " (fjob like N'%" + textBox1.Text +"%') or (mjob like N'%" + textBox1.Text +"%')";
com.CommandText = "select * from [pish-family] where " + job;
com.Connection= con;
com.CommandType = CommandType.Text;
con.ConnectionString = "data source=.;initial catalog=quranintegrated security=True";
da.SelectCommand = com;
da.Fill(dt);
dataGridView1.DataSource = dt;
}
دومي:
pishfamilyBindingSource.Filter = null;
if (textBox1.Text.Length != 0)
pishfamilyBindingSource.Filter = "fjob ='" + textBox1.Text + "' or mjob ='" + textBox1.Text + "'";
موفق باشيد.