AUTHOR: Marin Bratanov
DATE POSTED: October 26, 2018
Change the filtering of RadGrid so different columns filters are used with an "OR" logic instead of the default "AND" logic.
How to create custom filtering logic for RadGrid.
RadGrid uses AND logic for filters coming from separate columns. There isn't a built-in feature that allows you to change that, so you need to create your own filtering expression.
The solution boils down to creating a filter expression that will produce the desired results with the data source that you have.
There are two general ways to do this:
You can use an approach similar to the Filter Templates demo and fire a custom command instead of using a button. This lets you invoke the same functionality in the ItemCommand handler by checking for your custom command name.
If you want to pre-filter the grid for your end user, you can either filter the data source, or use the approach from the Apply Default Filter on Initial Load help article.
Using an OR operator for filtering several values in one column is supported out of the box in the Excel-like filtering where you can check several values that you want present in the filtered data for that column.