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

BeginEdit Command

Provides an entry point just before the editing begins.

Execution Parameter

The execution parameter is of type EditContext that exposes the following properties:

  • CellInfo: Gets the cell info associated with the operation.
  • TriggerAction: Gets the SourceTriggerAction value that triggered the operation.
  • Parameter: Gets an optional parameter holding additional information associated with the operation.

Custom BeginEdit 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 BeginEdit Command

public class CustomBeginEditCommand : DataGridCommand 
    public CustomBeginEditCommand() 
        this.Id = CommandId.BeginEdit; 
    public override bool CanExecute(object parameter) 
        // put your custom logic here  
        return true; 
    public override void Execute(object parameter) 
        var context = parameter as EditContext; 
        // put your custom logic here  
        // Executes the default implementation of this command 
        this.Owner.CommandService.ExecuteDefaultCommand(CommandId.BeginEdit, 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" Hold> 
             <local:CustomBeginEditCommand /> 

See Also

In this article
Not finding the help you need?