New to Telerik UI for WPF? Start a free 30-day trial
Close Filtering Popup on Pressing Filter Button
Updated on Oct 1, 2025
In order to close filtering Popup on pressing the fitler button, you need to override the OnApplyFilter method of FilteringControl.
A demo on how to achieve the desired behavior is available in our SDK Samples Browser. The demo is labeled "Close Filtering Popup" and can also be found on GitHub - CloseFilteringPopupFilterButton.
Example 1: Overriding OnApplyFilter method
C#
public class MyFilteringControl : FilteringControl
{
public MyFilteringControl(Telerik.Windows.Controls.GridViewColumn column) : base(column)
{
}
protected override void OnApplyFilter()
{
base.OnApplyFilter();
var popup = this.ParentOfType<Popup>();
if (popup != null)
{
popup.IsOpen = false;
}
}
}Then you can apply it to a desired column like so:
Example 2: Apply the Custom Filter to the column
C#
this.radGridView.Columns["Name"].FilteringControl = new MyFilteringControl(this.radGridView.Columns["Name"]);In case you are using NoXaml Binaries and Implicit Styles, you should additionally apply a template. Please refer to the Styling custom controls section.
The Style you should apply in XAML then is:
Example 3: Style targetting the custom control
XAML
<Style TargetType="my:MyFilteringControl" BasedOn="{StaticResource FilteringControlStyle}"/>