As the title states, I'm trying to apply the OR logical operator between multiple column filters instead of the default AND operator that is applied when using the popup UI of the GridView.
I haven't found any simple way of doing this without attaching a DataFilter to the grid, and we do not like the UI of the DataFilter.
What I did come up with is handling the Sorted event and iterating over the columns to get their filters and add them to a compound filter like so:
Telerik.Windows.Data.CompositeFilterDescriptor mainFilter =
mainFilter.LogicalOperator = Telerik.Windows.Data.FilterCompositionLogicalOperator.Or;
//Add all active column filters to the main filter
This works fine in terms of filtering correctly, but the funnel icon of the filtered columns is obviously unaffected since the FilterDescriptors collection of the grid no longer holds the filtered columns directly.
I tried manually setting each filtered column's FilterControl and setting its isActive property to true after ResumeNotifications(), but for some reasons it only highlights the last filtered column's funnel and only after opening and closing the filter control of the other filtered columns does it update their funnel's highlighting correctly. In addition it also doesn't seem to handle removing filters correctly (in terms of UI).
Does anyone have an idea how to achieve this? I can't believe that the need to apply the OR operator between columns hasn't arisen before me, am I missing something obvious?