I\'m trying to filter a BindingSource with a BindingList as Datasource. I tried BindingSource.Filter = \'Text Condition\' But it didn\'t work, nothing happens, the data on s
As an alternative to implementing IBindingListView which can be pretty involved you can try this type of filtering:
BindingList personas = new BindingList {
new Person{ Apellido = "App1", DNI = 3011, Edad = 20, Nombre ="Name1", Tamano = new decimal(1.7)}
,new Person{ Apellido = "App2", DNI = 1520, Edad = 30, Nombre ="Name2", Tamano = new decimal(1.5)}
,new Person{ Apellido = "App3", DNI = 5654, Edad = 21, Nombre ="Name3", Tamano = new decimal(1.6)}
,new Person{ Apellido = "App4", DNI = 778, Edad = 40, Nombre ="Name4", Tamano = new decimal(1.68)}
};
BindingList filtered = new BindingList(personas.Where(
p => p.Apellido.Contains("App1")).ToList());
grid.DataSource = filtered;