I am trying to filter my igGrid data based on a combination of nested AND and OR conditions. According to these old topics that is not supported by igGridFiltering:https://www.infragistics.com/community/forums/f/ignite-ui-for-jquery/86638/filtering-multiple-columnshttps://www.infragistics.com/community/forums/f/ignite-ui-for-jquery/76333/multiple-filters-on-single-column-and-boolean-logic
One of the proposed workarounds looks to be ideal, the customFunc setting on the datasource. Here it is in the latest documentation:
However, this function does not seem to work. Adding a console.log shows that it is not being called at all.
Any other suggestions on how to apply a complex filtering are also appreciated.Thanks
After investigating this further, I determined that your requirement could be achieved by using the customFunc of the datasource as suggested in one of the listed forum threads.
I have created a small sample implementing this approach. Multiple conditions for one column are set with the logical operator “OR” and conditions for multiple columns are set with “AND”.
Below I am attaching a sample demonstrating the described behavior. Please test it on your side and let me know if you need any further information regarding this matter.
Regards, Monika Kirkova, Infragistics
Your example wasn't exactly what I needed but it did point me in the right direction.I only needed the customFunc to work without any advanced filters. I hide the filter UI from my users to provide custom filter inputs.From your example I found out that the customFunc is only called when any filter is selected. Without a filter selected the grid displays directly what is in the original dataSource. I was able to force the customFunc to be executed every time by adding a dummy filter expression.jsfiddle.net/.../Thanks for the help!
I am glad that you were able to achieve your requirement.
Thank you for using Infragistics components.