Back to Devexpress

SpreadsheetControl.ShapeRemoved Event

windowsforms-devexpress-dot-xtraspreadsheet-dot-spreadsheetcontrol-974b3567.md

latest2.8 KB
Original Source

SpreadsheetControl.ShapeRemoved Event

Occurs after a drawing object has been removed from a worksheet.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
public event ShapeChangedEventHandler ShapeRemoved
vb
Public Event ShapeRemoved As ShapeChangedEventHandler

Event Data

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

PropertyDescription
ShapeIdGets the ID value of the drawing object that has been inserted or removed.
ShapeNameGets the name of the drawing object that has been inserted or removed.
ShapeTypeGets the type of the drawing object that has been inserted or removed.

Remarks

Handle the ShapeRemoved event to perform specific actions each time an end-user removes a drawing object from a worksheet in the SpreadsheetControl‘s UI. To obtain the type of the removed drawing object, use the ShapeType parameter.

To prevent a drawing object from being removed, use the SpreadsheetControl.ShapeRemoving event that is raised before a drawing object is deleted.

Note

By default, the ShapeRemoved event does not occur when removing a drawing object 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

ShapeRemoving

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.XtraSpreadsheet Namespace