Hello;
I've a datagridview with two columns name and surname.
I want to filter datagridview by textbox name or surname. (fulltextsearch)
((DataTable)dataGridView1.DataSource).DefaultView.RowFilter doesn't work because of bindingsource
dt.DefaultWiew.RowFilter works for dt but datagridview doesn't be filtered.
DataSet ds = new DataSet();SqlConnection conn = new SqlConnection("Data Source=.\\SQLEXPRESS;Initial Catalog=DBEMPEROR;Integrated Security=SSPI;");
conn.Open();
SqlDataAdapter adp = new SqlDataAdapter();
SqlCommand comm = new SqlCommand();
comm.CommandText = "select name, surname from PERSON";
comm.Connection = conn;
adp.SelectCommand = comm;
DataTable dt = new DataTable("person");
adp.Fill(dt);
ds.Tables.Add(dt);
bindingSource1.DataSource = ds; //from toolbox
bindingSource1.DataMember = "person";
dataGridView1.DataSource = bindingSource1;