# FlyoutGroupHeader Command

The `FlyoutGroupHeader` command is associated with the `Tap` event that occurs over a group header in the flyout.

## Execution Parameter

The execution parameter is of type `FlyoutGroupHeaderTapContext` and exposes the following properties:

* `Action`—Gets the `DataGridFlyoutGroupHeaderTapAction` value that identifies the meaning of the `Tap` event. The possible values are `ChangeSortOrder` and `RemoveDescriptor`.
* `Descriptor`—Gets the `GroupDescriptorBase` instance associated with the command.

## Custom FlyoutGroupHeader 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 FlyoutGroupHeader Command**

```C#
public class CustomFlyoutGroupHeaderTap : DataGridCommand
{
	public CustomFlyoutGroupHeaderTap()
	{
		this.Id = CommandId.FlyoutGroupHeaderTap;
	}

	public override bool CanExecute(object parameter)
	{
		//put your custom logic here
		return true;
	}

	public override void Execute(object parameter)
	{
		var context = parameter as FlyoutGroupHeaderTapContext;
		//put your custom logic here

		this.Owner.CommandService.ExecuteDefaultCommand(CommandId.FlyoutGroupHeaderTap, 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:CustomFlyoutGroupHeaderTap/>
		</grid:RadDataGrid.Commands>
	</grid:RadDataGrid>
</Grid>
```

## See Also

* [CellTap](https://www.telerik.com/winui/documentation/controls/raddatagrid/commands/datagrid-celltapcommand)
* [CellDoubleTap](https://www.telerik.com/winui/documentation/controls/raddatagrid/commands/datagrid-celldoubletappedcommand)
* [ColumnHeaderTap](https://www.telerik.com/winui/documentation/controls/raddatagrid/commands/datagrid-columnheadertapcommand)
* [FilterButtonTap](https://www.telerik.com/winui/documentation/controls/raddatagrid/commands/datagrid-filterbuttontapcommand)
