title: What collection do I need to return to support filtering in WCF?
body: <p>I have a WCF client that I need to put a DTO in to a <a href="http://msdn.microsoft.com/en-us/library/system.windows.forms.bindingsource.aspx" rel="nofollow">BindingSource</a>, however when I attempt to apply a filter to the BindingSource it does not work as neather List nor BindingList because both of them return false for <code>IBindingListView.SupportsFiltering</code>.</p>
  
  <p>What datatype do I need to be using to be able to filter on my lists?</p>
  
  <p>The proxy DTO:</p>
  
  <pre><code>namespace MyApp.DataContracts
  {
      [System.Runtime.Serialization.DataContractAttribute(Name = "ServerSetupDTO", Namespace = "http://example.com/MyApp")]
      [System.SerializableAttribute()]
      public partial class ServerSetupDTO : object, System.Runtime.Serialization.IExtensibleDataObject
      {
          [System.Runtime.Serialization.DataMemberAttribute()]
          public System.ComponentModel.BindingList&lt;MyApp.DataContracts.DatabaseInfo&gt; GenericPreconfigs
          {
              //(Snip)
          }
  
          //(Snip)
      }
  
      [System.Runtime.Serialization.DataContractAttribute(Name = "DatabaseInfo", Namespace = "http://example.com/MyApp")]
      [System.SerializableAttribute()]
      public partial class DatabaseInfo : object, System.Runtime.Serialization.IExtensibleDataObject
      {
          [System.Runtime.Serialization.DataMemberAttribute()]
          public string AllowedServer
          {
              //(Snip)
          }
  
          //(Snip)
      }
  }
  </code></pre>
  
  <p>Applying the filter:</p>
  
  <pre><code>ServerSetupDTO serverSetupDTO = proxyClient.GetServerSetup();
  bsServerSettings.DataSource = serverSetupDTO ;
  
  bsPreconfigList.DataMember = "GenericPreconfigs";
  bsPreconfigList.DataSource = bsServerSettings;
  
  //This filter never gets applied, bsPreconfigList.SupportsFiltering is false.
  bsPreconfigList.Filter = String.Format("AllowedServer = '{0}'", cmbHost.Text); 
  </code></pre>