Can you apply an OR condition on 2 column filters, or programmatically set the filter value for the GridSearchBox ?
1 Answer, 1 is accepted
answered on 24 Nov 2020, 04:21 PM
Please see the comments on your questions as follows:
Applying "OR" condition on 2 or more columns
The default behavior of column filters must be AND because this is what people expect. You can, hovewer, customize that by using the OnRead event the grid exposes - it provides you with all the filter descriptors and that lets you implement the actual filtering in your real data source in any way you prefer - either through custom application code, or you could loop the filters and create one composite filter with all of them that has the OR logical operator, instead of having a series of separate filters that our logic will apply the AND operator to. The following article explains how the OnRead event works and offers some examples that you can use as base to review the functionality and build what you need: https://docs.telerik.com/blazor-ui/components/grid/manual-operations. Generally, this is the event where you can customize any of the grid read operations and implement your own logic.
Programmatically set the filter value for the GridSearchBox
Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.