menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Class CutCopyActionBeginEventArgs - Blazor API Reference | Syncfusion

    Show / Hide Table of Contents

    Class CutCopyActionBeginEventArgs

    Provides information about the CutCopyActionBegin event.

    Inheritance
    System.Object
    CutCopyActionBeginEventArgs
    Namespace: Syncfusion.Blazor.Spreadsheet
    Assembly: Syncfusion.Blazor.Spreadsheet.dll
    Syntax
    public class CutCopyActionBeginEventArgs : Object

    Constructors

    CutCopyActionBeginEventArgs()

    Declaration
    public CutCopyActionBeginEventArgs()

    Properties

    Cancel

    Gets or sets a value indicating whether the copy or cut operation should be cancelled.

    Declaration
    public bool Cancel { get; set; }
    Property Value
    Type Description
    System.Boolean

    A System.Boolean indicating whether to cancel the operation. The default value is false.

    Remarks

    When set to true, the copy or cut operation will be cancelled.

    This property allows event handlers to prevent the default clipboard behavior by setting it to true.

    Examples
    // Cancel clipboard operations on protected content
    void OnCutCopyActionBegin(CutCopyActionBeginEventArgs args)
    {
        if (IsProtectedContent())
        {
            args.Cancel = true;
        }
    }

    ClipboardAction

    Gets the current action indicating whether it is a copy or cut operation.

    Declaration
    public string ClipboardAction { get; }
    Property Value
    Type Description
    System.String

    A System.String representing the clipboard action type. Values can be Copy or Cut.

    Remarks

    This property indicates which type of clipboard operation is currently in progress.

    When a user performs a clipboard operation, this property will contain either Copy (when content is being copied) or Cut (when content is being moved).

    Examples
    // Check if the operation is Cut before proceeding
    void OnCutCopyActionBegin(CutCopyActionBeginEventArgs args)
    {
        if (args.ClipboardAction == "Cut")
        {
            // Custom handling for cut operations
            Console.WriteLine("Cut operation detected");
        }
    }

    CopiedRange

    Gets the full address of the cell range currently in the clipboard, including the worksheet name and range coordinates.

    Declaration
    public string CopiedRange { get; }
    Property Value
    Type Description
    System.String

    A System.String containing the qualified range address in the format "SheetName!Range" (e.g., "Sheet1!A1:A10" for multiple cells or "Sheet2!A1" for a single cell). The default value is null.

    Remarks

    This property stores the complete address information of cells that are currently copied or cut to the clipboard. The address includes:

    • The worksheet name, followed by an exclamation mark (!)
    • The cell range address in A1 reference style (e.g., "A1:D10" or a single cell like "A1")

    This property is especially useful for tracking the source of clipboard operations and implementing custom paste behaviors.

    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved