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

Workbook.RowsInserting Event

Occurs before new rows are added to 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.v20.1.dll

Declaration

public event RowsChangingEventHandler RowsInserting
Public Event RowsInserting As RowsChangingEventHandler

Event Data

The RowsInserting event's data class is RowsChangingEventArgs. 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.

Remarks

The RowsInserting event allows you to perform any actions before adding new rows to a worksheet. You can cancel inserting new rows by setting the event parameter's Cancel property to true.

After new rows have been inserted, the Workbook.RowsInserted event is raised.

NOTE

By default, the RowsInserting event does not occur when adding new rows 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.

Implements

See Also