New to Telerik UI for WinUI? Download free 30-day trial

CellFlyoutAction Command

Handles the contents and the appearance of a grid cell, when 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 which exposes the following properties:

  • CellInfo: Gets the DataGridCellInfo instance this cell is associated with, giving 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

Examples 1 and 2 show how to create a class that inherits from DataGridCommand and add it to the Commands collection.

Example 1: Creating a custom CellFlyoutAction Command

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);               
    } 
} 

Example 2: Adding the custom Command to the Commands collection

<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

In this article
Not finding the help you need?