DataGridView Filter by Multiple Columns

It filters only datatable and datatable's default view.
I want to filter my datagridview.
Here is my code again
            DataSet ds = new DataSet();
            SqlConnection conn = new SqlConnection("<>");
            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;

Comments

Popular

Reference a form from subform in C#.net

Create a well designed OOP project in Java(Using Netbeans)