Class BeforeSaveEventArgs
Provides information for the BeforeSave event, raised just before the workbook is saved.
Inherited Members
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 |
|
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 |
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 |
Remarks
This property is controlled internally by the component and cannot be set by application code.