.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+

Workbook.ColumnsRemoving Event

Occurs before columns are removed from a worksheet.

You need an active license for the DevExpress Office File API Subscription or DevExpress Universal Subscription to use this event in production code.

Namespace: DevExpress.Spreadsheet

Assembly: DevExpress.Docs.v21.2.dll


public event ColumnsChangingEventHandler ColumnsRemoving

Event Data

The ColumnsRemoving event's data class is ColumnsChangingEventArgs. 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.
Count Gets the number of rows/columns that will be inserted or removed. Inherited from RowsColumnsChangingEventArgsBase.
StartIndex Gets the index of the first row/column after which rows/columns will be inserted or removed. Inherited from RowsColumnsChangingEventArgsBase.


The ColumnsRemoving event allows you to perform any actions before columns are deleted from a worksheet. To prevent columns from being deleted, set the event parameter’s Cancel property to true.

After columns have been removed from a worksheet, the Workbook.ColumnsRemoved event is raised.


By default, the ColumnsRemoving event does not occur when removing columns 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 Workbook.Options.Events.RaiseOnModificationsViaAPI notation) to true.


See Also