We currently filter some MVC grids on the client (this works well for us) however a new requirement is to filter on a value in ONE column, and if value appears in a set of other columns.
E.G.
A + (B or C or D)
current we filter like this on the "A" column
grid.dataSource.filter({
logic: "or",
filters: [
{ field: "SkillStatus", operator: "contains", value: "D" }
]
});
and this is how we filter on the B,C & D columns
grid.dataSource.filter({
logic: "or",
filters: [
{ field: "SkillName", operator: "contains", value: val },
{ field: "SkillCode", operator: "contains", value: val },
{ field: "SkillDesc", operator: "contains", value: val },
]
});
Is there a way to apply both these filters to one grid, such that
A | B | C | D |
1 | X | Y | X |
1 | Y | X | X |
2 | Z | Z | Z |
2 | Y | Y | Z |
A = 1 , "Other Value" = X returns
A | B | C | D |
1 | X | Y | X |
1 | Y | X | X |
A = 1 , "Other Value" = Z returns
A | B | C | D |
(no records)
A = 2 , "Other Value" = Z returns
A | B | C | D |
2 | Z | Z | Z |
2 | Y | Y | Z |
A = 2 , "Other Value" = X returns
A | B | C | D |
(no records)