alexa
menu

Blazor

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

    Show / Hide Table of Contents

    Class BeforeSaveEventArgs

    Provides information for the BeforeSave event, raised just before the workbook is saved.

    Inheritance
    object
    BeforeSaveEventArgs
    Inherited Members
    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 BeforeSaveEventArgs
    Remarks

    Use these properties to customize the save operation (for example, change the output file name) or cancel it.

    Constructors

    BeforeSaveEventArgs()

    Declaration
    public BeforeSaveEventArgs()

    Properties

    Cancel

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

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

    true to cancel the save; otherwise, false. The default is false.

    Remarks

    Set this property to true in the BeforeSave event handler to prevent the workbook from being saved. This is useful for validating data, enforcing business rules, or prompting the user for confirmation before saving.

    FileName

    Gets or sets the name of the file to use when saving the workbook.

    Declaration
    public string FileName { get; set; }
    Property Value
    Type Description
    string

    A string representing the desired output file name, including extension (for example, "Report.xlsx"). If null or empty, a component-defined default name may be used.

    Remarks

    This value controls only the download/display name and does not affect the workbook content. Avoid invalid file name characters that are not supported by the operating system.

    SaveType

    Gets the file format that will be used to save the workbook.

    Declaration
    public string SaveType { get; }
    Property Value
    Type Description
    string

    A string indicating the save format. The current value is "Xlsx".

    Remarks

    This property is controlled internally by the component and cannot be set by application code.

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