# CellFlyoutAction Command

The `CellFlyoutAction` command handles the contents and the appearance of a grid cell when a cell flyout is initiated either through hover or hold. The default implementation will open а flyout displaying the cell contents.

## Execution Parameter

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

* `CellInfo`—Gets the `DataGridCellInfo` instance with which the cell is associated, providing access to its column and data item.
* `FlyoutTemplate`—Gets or sets the `DataTemplate` that can be used instead of default cell template to display cell content.
* `IsOpen`—Gets or sets whether the flyout is open.

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

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

	public override bool CanExecute(object parameter)
	{
		var context = parameter as CellFlyoutActionContext;
		// put your custom logic here
		return true;
	}

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

		this.Owner.CommandService.ExecuteDefaultCommand(CommandId.CellFlyoutAction, 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">
		<grid:RadDataGrid.Commands>
			<local:CustomCellFlyoutActionCommand />
		</grid:RadDataGrid.Commands>
	</grid:RadDataGrid>
</Grid>
```

## See Also

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