title: DataGridView Filter Data
body: <p>So probably a newbie question but something I could not find on google a let say resanable example off.</p>
  
  <p>So I have a DataTable that I created from some xml</p>
  
  <p>The columns are like:</p>
  
  <ul>
  <li>key</li>
  <li>Description</li>
  <li>parent</li>
  </ul>
  
  <p>This DataTable is bound to a gridview with a DataBinding</p>
  
  <p>The filter form returns an array of keys(string)</p>
  
  <p>Now I would like to display only keys that get returned from filter.</p>
  
  <p>My code so far:</p>
  
  <pre><code>    List&lt;string&gt; listKeys = new List&lt;string&gt;(_keys);
  
      foreach (DataGridViewRow row in grdData.Rows)
      {
          string k = row.Cells[4].Value.ToString();
          if (!listKeys.Contains(k))
          {
              CurrencyManager currencyManager1 = (CurrencyManager)BindingContext[grdData.DataSource];
              currencyManager1.SuspendBinding();
              row.Visible = false;
              currencyManager1.ResumeBinding();
          }
          else
          {
              row.Visible = true;
              //listKeys.Remove(k);
          }
      }
  </code></pre>
  
  <p>The result I am getting is either always full grid or none.
  And the code above is very slow(performance wise). Any faster way of doing this?</p>