alexa
menu

Blazor

  • Code Examples
  • Upgrade Guide
  • User Guide
  • Demos
  • Support
  • Forums
  • Download
Search Results for

    Show / Hide Table of Contents

    Class ActionBeginningEventArgs

    Provides data for the ActionBeginning event, raised before a Spreadsheet action is executed.

    Inheritance
    object
    ActionCompletedEventArgs
    ActionBeginningEventArgs
    Inherited Members
    ActionCompletedEventArgs.Action
    ActionCompletedEventArgs.Range
    ActionCompletedEventArgs.SheetName
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Syncfusion.Blazor.Spreadsheet
    Assembly: Syncfusion.Blazor.Spreadsheet.dll
    Syntax
    public class ActionBeginningEventArgs : ActionCompletedEventArgs
    Remarks

    This class contains information about a Spreadsheet action that is about to be performed.

    It inherits the action name, selected range, and worksheet name from ActionCompletedEventArgs, and adds the ability to cancel the action by setting Cancel to true.

    Use this event to validate conditions, monitor user activity, enforce business rules, or cancel Spreadsheet operations before they are executed.

    Examples

    This example demonstrates how to prevent clear operations.

    <SfSpreadsheet ActionBeginning="OnActionBeginning">
        <SpreadsheetRibbon></SpreadsheetRibbon>
    </SfSpreadsheet>
    
    @code {
        private void OnActionBeginning(ActionBeginningEventArgs args)
        {
            if (args.Action == "Clear")
            {
                args.Cancel = true;
            }
        }
    }

    Constructors

    ActionBeginningEventArgs()

    Declaration
    public ActionBeginningEventArgs()

    Properties

    Cancel

    Gets or sets a value indicating whether the action should be cancelled.

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

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

    Remarks

    Setting this property to true prevents the requested Spreadsheet action from executing.

    This property is only available on ActionBeginningEventArgs because the action can only be cancelled before it runs.

    In this article
    Back to top Generated by DocFX
    Copyright © 2001 - 2026 Syncfusion Inc. All Rights Reserved