ParamQuery grid support forum

General Category => Help for ParamQuery Grid (free version) => Topic started by: lyassa on October 08, 2023, 12:29:02 pm

Title: How to filter with mixed "and" and "or"
Post by: lyassa on October 08, 2023, 12:29:02 pm
How can I filter the grid on a condition that needs both "and" and "or"? For example:
status = "New" AND (firstName contain "john" OR lastName contain "john" OR companyName contain "john")

I played with filterModel: { on: true, mode : "OR"}  and filterModel: { on: true, mode : "AND"} but couldn't get it to work.  Any advice is greatly appreciated.

Thank you
Title: Re: How to filter with mixed "and" and "or"
Post by: lyassa on October 12, 2023, 01:49:04 am
Looks like mixing ANDs and ORs is not possible. I ended up filtering the dataModel and refresh the grid. Doing it that way is a lot more flexible than using the built in filter method.