title: c# Datagridview multiple filters
body: <p>I am trying to filter a datagrid with two or more textboxes.
  Is there a simple way to enable this? As it is now the datagrid is only filtered on the last criteria checked.</p>
  
  <p>I have searched all day and could not find a solution.</p>
  
  <p>This is the code for the two boxes.  I added the two filters to the last box but this was just a guess and I knew it probably wouldn't work.</p>
  
  <p>Thanks, A.</p>
  
  <pre><code>private void textBox4_TextChanged(object sender, EventArgs e)
      {
          BindingSource bs = new BindingSource();
          bs.DataSource = dataGridView1.DataSource;
          bs.Filter = "Bank like '%" + textBox4.Text + "%'";
          dataGridView1.DataSource = bs;
      }
  
      private void textBox5_TextChanged(object sender, EventArgs e)
      {
          BindingSource bs = new BindingSource();
          bs.DataSource = dataGridView1.DataSource;
  
          bs.Filter = "Bank like '%" + textBox4.Text + "%'";
          bs.Filter = "currency like '" + textBox5.Text + "'";
  
          dataGridView1.DataSource = bs;
      }
  </code></pre>