Back to Devexpress

SpreadsheetControl.SheetRemoved Event

windowsforms-devexpress-dot-xtraspreadsheet-dot-spreadsheetcontrol-f758753c.md

latest2.9 KB
Original Source

SpreadsheetControl.SheetRemoved Event

Occurs after a worksheet has been removed from a workbook via the SpreadsheetControl‘s UI.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
public event SheetRemovedEventHandler SheetRemoved
vb
Public Event SheetRemoved As SheetRemovedEventHandler

Event Data

The SheetRemoved event's data class is SheetRemovedEventArgs.

Remarks

Handle the SheetRemoved event to perform specific actions each time an end-user deletes a worksheet from a workbook using the control’s UI.

When a user interface command is used to remove the worksheet from the workbook, the SpreadsheetControl.ActiveSheetChanged event fires first, and the SheetRemoved event fires next. The SpreadsheetControl.ActiveSheetChanging event does not occur.

After a new worksheet has been created, the SpreadsheetControl.SheetInserted event is raised.

Note

By default, the SheetRemoved event does not occur when removing 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

SheetInserted

How to: Delete a Worksheet

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.XtraSpreadsheet Namespace