BindingSource bs=new BindingSource(); List<items> lstItems= ListItems(); bs.DataSource=lstItems; //I bind this bindingsouce to a gridview. grd.DaataSource=bs; //Then I copy this original BindingSource to a separate BindngSource BindingSource filterBs=new BindingSource(); //Then I use a filter condition to Bindingsource filterBs.Filter= "ItemCode='1' and cost>'200'"; grd.DataSource=null; //Re binding the datasouce of the grid to the filtered bindingsource. grd.DataSource=filterBs;</items>
filter.Bs.Filter = "ItemCode = '1' AND cost > 200";
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)