Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

SpreadsheetControl.SheetRenaming Event

Occurs when a worksheet is about to be renamed via the SpreadsheetControl‘s UI.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v24.2.dll

NuGet Package: DevExpress.Win.Spreadsheet

#Declaration

public event SheetRenamingEventHandler SheetRenaming

#Event Data

The SheetRenaming event's data class is SheetRenamingEventArgs. The following properties provide information specific to this event:

Property Description
Cancel Gets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
NewName Gets or sets the new name of the renamed worksheet.
OldName Gets the name of the worksheet being renamed.

#Remarks

The SheetRenaming event allows you to perform any actions before an end-user renames a worksheet using the control’s UI. You can cancel renaming a worksheet by setting the event parameter’s Cancel property to true.

After a worksheet name has been changed, the SpreadsheetControl.SheetRenamed event is raised.

Note

By default, the SheetRenaming event does not occur when renaming a worksheet in code. However, this event will also be triggered by changes made via an API if you set the WorkbookEventOptions.RaiseOnModificationsViaAPI property (accessible via the SpreadsheetControl.Options.Events.RaiseOnModificationsViaAPI notation) to true.

See Also