# CellPointerOver Command

The `CellPointerOver` command handles the `PointerOver` event over a grid cell. The default implementation will attempt to display the hover UI for either the cell itself or for the owning grid row, depending on the `SelectionUnit` value.

## Execution Parameter

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

* `Column`—Gets the `DataGridColumn` instance with which the cell is associated.
* `Item`—Gets the underlying data row (`ViewModel` instance) with which the cell is associated.

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

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

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

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

		this.Owner.CommandService.ExecuteDefaultCommand(CommandId.CellPointerOver, 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:CustomCellPointerOverCommand/>
		</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)
* [FlyoutGroupHeader](https://www.telerik.com/winui/documentation/controls/raddatagrid/commands/datagrid-flyoutgroupheadertapcommand)
* [ColumnHeaderTap](https://www.telerik.com/winui/documentation/controls/raddatagrid/commands/datagrid-columnheadertapcommand)
* [FilterButtonTap](https://www.telerik.com/winui/documentation/controls/raddatagrid/commands/datagrid-filterbuttontapcommand)
