Filtering binding source in C#
<p>My code is like this</p>

<pre><code>BindingSource bs=new BindingSource();
List&lt;Items&gt; lstItems= ListItems();

bs.DataSource=lstItems;
</code></pre>

<p>I bind this bindingsouce to a gridview.</p>

<pre><code>grd.DaataSource=bs;
</code></pre>

<p>Then I copy this original BindingSource to a separate BindngSource</p>

<pre><code>BindingSource filterBs=new BindingSource();
</code></pre>

<p>Then I use a filter condition to Bindingsource</p>

<pre><code>filterBs.Filter= "ItemCode='1' and cost&gt;'200'";

grd.DataSource=null;
</code></pre>

<p>Re binding the datasouce of the grid to the filtered bindingsource.</p>

<pre><code>grd.DataSource=filterBs;
</code></pre>

<p>But now also it shows all records in the grid.</p>
