Does DataFilter provide a way to remove selections when a filter is removed?

I looked at the demos and API but didn't see a way to do what I'm looking for. I would like to clear the list of selected items when a filter is removed. For my immediate purposes, it would be sufficient to clear selected items once all filters are removed if that is easier to determine, though clearing an associated list once its filter is removed would be ideal.

I am familiar with using the Auto setting on the filter. My issue comes up for two reasons: (1) after removing a filter then re-adding the same filter, the selections are still there but the filter does not get automatically re-applied unless I change something and (2) I'm looking for a way to provide visual feedback to a user on whether a filter has been applied or not (currently my filter component resides in a RadzenPanel that can be collapsed - I want to be able to show the user that there is a filter applied when the panel is collapsed). If my list of selected items is clear, I can use the Count() > 0 on the selected items list to determine what to show the user.


If I remove the default filter in our demo and later add the same it will not keep the selected operator or value:

Not with a simple RadzenDataFilterProperty like Employee Last Name. But if you try one with a FilterTemplate dropdown like OrderID you will see that it does keep previous selections.

Since this is a template you have full access to what's bound and you can clear the selection when needed.

Yes, true, I have full access to the list bound to the dropdown and I can clear it when I need to. My question refers to the "when I need to" part. How do I know when the filter has been removed? That would be when I need to clear it.

Thanks for the help!

Every time you update something in the DataFilter component ViewChanged callback is raised where you can easily check what kind of filters you have and what template values need to be clear. Debugging our code and demos is also very easy since you have everything for free.