Dozd

Dozd

  • NA
  • 65
  • 0

Binding source filtering data

Nov 11 2015 6:19 AM

Hi, one table with two columns is data source of binding source. We want to filter data first my “Name”, and after that by “City”.

Name

City

John

London

John

New York

Jim

London

bindingSource.Filter="Name = 'John'";

Result:

Name

City

John

London

John

New York

If another filter is applied (WITHOUT bindingSource.RemoveFilter())

bindingSource.Filter="City = 'London'";

Result:

Name

City

John

London

Jim

London


My question is: If once binding source is filtered and filter is not removed, why second filter is not applied only on already filtered data?

if first filter filtered data once and is applied second filter on filtered data why we have not situation like

bindingSource.Filter="Name ='John' AND City = 'London'";


Answers (1)