[PR #2263] Make ClearFilters in RadzenDataGridColumn virtual #3165

Closed
opened 2026-01-29 18:22:12 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/radzenhq/radzen-blazor/pull/2263

State: closed
Merged: Yes


Description:
Currently, the ClearFilters method in RadzenDataGridColumn is not virtual, which prevents developers from overriding it in custom column implementations.

Why this change is needed:
When using FilterValueTemplate and SecondFilterValueTemplate, the built-in Clear button cannot reset the values inside these templates, since it has no access to them. To handle this properly, I need to override ClearFilters so I can reset the template’s filter values whenever the method is invoked.

Proposed solution:
Mark ClearFilters as virtual, allowing developers to extend its behavior by overriding it in their derived components.

Impact:
This change is backward-compatible and does not affect existing functionality. It only provides more flexibility for advanced use cases where filter values are rendered via templates.

**Original Pull Request:** https://github.com/radzenhq/radzen-blazor/pull/2263 **State:** closed **Merged:** Yes --- **Description:** Currently, the `ClearFilters` method in `RadzenDataGridColumn` is not virtual, which prevents developers from overriding it in custom column implementations. **Why this change is needed:** When using `FilterValueTemplate` and `SecondFilterValueTemplate`, the built-in *Clear* button cannot reset the values inside these templates, since it has no access to them. To handle this properly, I need to override `ClearFilters` so I can reset the template’s filter values whenever the method is invoked. **Proposed solution:** Mark `ClearFilters` as `virtual`, allowing developers to extend its behavior by overriding it in their derived components. **Impact:** This change is backward-compatible and does not affect existing functionality. It only provides more flexibility for advanced use cases where filter values are rendered via templates.
claunia added the pull-request label 2026-01-29 18:22:12 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#3165