New to Telerik UI for WinUI? Start a free 30-day trial
FilterButtonTap Command
Updated on Mar 26, 2026
The FilterButtonTap command handles the tap gesture over a Filter button. The default implementation will open the Filtering Flyout.
Execution Parameter
The execution parameter is of type FilterButtonTapContext and exposes the following properties:
AssociatedDescriptor—Gets theFilterDescriptorBaseinstance associated with the context. Typically, this is thePropertyFilterDescriptoralready applied to the column instance.FirstFilterControl—Gets or sets theIFilterControlcontrol that represents the UI used to generate the firstFilterDescriptorBase.SecondFilterControl—Gets or sets theIFilterControlcontrol that represents the UI used to generate the secondFilterDescriptorBase.Column—Gets theDataGridColumninstance that owns the Filter button that is being tapped.
Custom FilterButtonTap Command
The following examples show how to create a class that inherits from the DataGridCommand and add it to the Commands collection.
Create a Custom FilterButtonTap Command
C#
public class CustomFilterButtonTapCommand : DataGridCommand
{
public CustomFilterButtonTapCommand()
{
this.Id = CommandId.FilterButtonTap;
}
public override bool CanExecute(object parameter)
{
var context = parameter as FilterButtonTapContext;
// put your custom logic here
return true;
}
public override void Execute(object parameter)
{
var context = parameter as FilterButtonTapContext;
// put your custom logic here
this.Owner.CommandService.ExecuteDefaultCommand(CommandId.FilterButtonTap, context);
}
}
Add the Custom Command to the Commands Collection
XAML
<Grid xmlns:grid="using:Telerik.UI.Xaml.Controls.Grid">
<grid:RadDataGrid Width="600" Height="460" x:Name="grid" Hold>
<grid:RadDataGrid.Commands>
<local:CustomFilterButtonTapCommand/>
</grid:RadDataGrid.Commands>
</grid:RadDataGrid>
</Grid>