menu

Blazor

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

    Show / Hide Table of Contents

    Class AutofillActionBeginEventArgs

    Provides information about the AutofillActionBegin event.

    Inheritance
    System.Object
    AutofillActionEndEventArgs
    AutofillActionBeginEventArgs
    Inherited Members
    AutofillActionEndEventArgs.DataRange
    AutofillActionEndEventArgs.Direction
    AutofillActionEndEventArgs.FillRange
    Namespace: Syncfusion.Blazor.Spreadsheet
    Assembly: Syncfusion.Blazor.Spreadsheet.dll
    Syntax
    public class AutofillActionBeginEventArgs : AutofillActionEndEventArgs

    Constructors

    AutofillActionBeginEventArgs()

    Declaration
    public AutofillActionBeginEventArgs()

    Properties

    Cancel

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

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

    A System.Boolean indicating whether to cancel the autofill operation. The default value is false. If set to true, the autofill operation will be cancelled.

    Remarks

    Setting this property to true during the AutofillActionBegin event prevents the autofill operation from completing.

    This can be used to implement custom validation or business rules for autofill operations.

    Examples
    private void OnAutofillActionBegin(AutofillActionBeginEventArgs args)
    {
        // Cancel autofill operations on protected ranges
        if (IsProtectedRange(args.FillRange))
        {
            args.Cancel = true;
        }
    
        // Example: Prevent autofill for specific data types
        if (ContainsFormulas(args.DataRange))
        {
            args.Cancel = true;
        }
    }
    Back to top Generated by DocFX
    Copyright © 2001 - 2025 Syncfusion Inc. All Rights Reserved