Grid FilterQuery not working as expected
Hey guys! Some months ago we built our own grid FilterQuery builder and we're having some issues with it:
When i build a Filter with 3 conditions, each of that has "and" as predicate, then always the middle condition does not get applied to the grid.
What we are doing:
For each of those filter columns (condition - Field - operator - value) we generate a WhereFilter and add it to a List of WhereFilters like that
So in this case the Grid displays the content filtered by "Number contains AG" and "CustomFieldDate1 lessthanorequal 11.06.2021" but not by "ProjectStatus contains 10 Akquise"
Any ideas what I've done wrong? Hope you can comprehend what I'm trying to explain :D
Best Regards!
What we are doing:
For each of those filter columns (condition - Field - operator - value) we generate a WhereFilter and add it to a List of WhereFilters like that
andPredicate.Add(new WhereFilter()
{
Field = gridFilter[i].Field,
value = gridFilter[i].Value,
Operator = gridFilter[i].Operator.ToString().ToLower(),
Condition = "and",
IgnoreCase = !gridFilter[i].MatchCase,
IgnoreAccent = true
});
At the end we add those andPredicates to a new Query:
var colPre = WhereFilter.And(andPredicate);QueryFilter = new Query().Where(colPre);
The final Query object looks like that:
So in this case the Grid displays the content filtered by "Number contains AG" and "CustomFieldDate1 lessthanorequal 11.06.2021" but not by "ProjectStatus contains 10 Akquise"
Any ideas what I've done wrong? Hope you can comprehend what I'm trying to explain :D
Best Regards!
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
RS
Renjith Singh Rajendran
Syncfusion Team
June 15, 2021 11:52 AM UTC
Hi Patrick,
Greetings from Syncfusion support.
We checked this case by creating a sample based on your scenario. But filter gets applied properly with the sample from our side. We are attaching a sample which we have tried for your reference, please download the sample from the link below,
Kindly refer the above sample, and if you are still facing difficulties then the following details would be helpful for us to proceed further.
- Share a simple issue reproducing sample for us to validate.
- Or if possible, reproduce the problem with the above attached sample and share with us for further analysis.
- Share the video demo showing the replication of the problem you are facing.
- Share the exact scenario you are facing this reported problem.
- Share the complete grid rendering codes and custom query codes.
Please get back to us if you need further assistance.
Regards,
Renjith R
Marked as answer
UN
Unknown
June 18, 2021 12:55 PM UTC
Thank you very much for your effort. I did not know if anything was wrong with the Query or not and would've tried some stuff with it for nothing haha.
The error was in our CustomDataAdaptor. Thanks for the example and the response
RS
Renjith Singh Rajendran
Syncfusion Team
June 21, 2021 06:58 AM UTC
Hi Patrick,
Thanks for your update. We infer that you have resolved the problem from your side. Please get back to us if you need further assistance.
Regards,
Renjith R
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
- Marked answer
-
UN Unknown
- Jun 14, 2021 01:28 PM UTC
- Jun 21, 2021 06:58 AM UTC