title: Filtering a DataGridView with a BindingList
body: <p>I've created a WinForms application with a DataGridView and I'd like to filter it. It's setup as follows:</p>
  
  <p>A catalogue entry:</p>
  
  <pre><code>public class CatalogueEntry
  {
      private string _code;
      private string _desc;
  
      public CatalogueEntry(string code, string desc)
      {
          _code = code;
          _desc = desc;
      }
  
      public string Code =&gt; _code;
      public string Description =&gt; _desc;
  }
  </code></pre>
  
  <p>The catalogue list (using BindingList):</p>
  
  <pre><code>public class Catalogue : BindingList&lt;CatalogueEntry&gt;
  {
  
  }
  </code></pre>
  
  <p>Initialisation:</p>
  
  <pre><code>_catalogue = new Catalogue();
  
  _catalogue.Add(new CatalogueEntry("BAGG", "It scares us all"));
  _catalogue.Add(new CatalogueEntry("BIGG", "It embiggens us all"));
  _catalogue.Add(new CatalogueEntry("BOGG", "It demeans us all"));
  _catalogue.Add(new CatalogueEntry("BUGG", "It frightens us all"));
  
  _source = new BindingSource();
  _source.DataSource = _catalogue;
  
  dataGridView.DataSource = _source;
  </code></pre>
  
  <p>I get a nice grid of the above data.</p>
  
  <p>If I try to set the filter on the BindingSource as follows:</p>
  
  <pre><code>var filter = "Description like 'scares'";
  _source.Filter = filter;
  </code></pre>
  
  <p>Nothing happens, i.e. the filter doesn't appear to work. What can I do to get the filter working?</p>
  
  <p>I'm guessing the underlying data source isn't a database so won't understand "Description like 'scares'".</p>
  
  <p>EDIT: If I change my filter as follows:</p>
  
  <pre><code>var text = "scares";
  var list = _catalogue.Where(entry =&gt; entry.Description.Contains(text));
  _source.DataSource = list;
  </code></pre>
  
  <p>then it filters as required; however this is changing the list. Is this the right way to do it?</p>