Back to Devexpress

SpreadsheetControl.RowsInserting Event

windowsforms-devexpress-dot-xtraspreadsheet-dot-spreadsheetcontrol-86ac6e25.md

latest3.3 KB
Original Source

SpreadsheetControl.RowsInserting Event

Occurs when new rows are about to be inserted into a worksheet.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
public event RowsChangingEventHandler RowsInserting
vb
Public Event RowsInserting As RowsChangingEventHandler

Event Data

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

PropertyDescription
CancelGets or sets a value indicating whether the event should be canceled. Inherited from CancelEventArgs.
CountGets the number of rows/columns that will be inserted or removed. Inherited from RowsColumnsChangingEventArgsBase.
StartIndexGets 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 an end-user adds new rows using the control’s UI. You can cancel inserting new rows by setting the event parameter’s Cancel property to true.

After new rows have been inserted, the SpreadsheetControl.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 SpreadsheetControl.Options.Events.RaiseOnModificationsViaAPI notation) to true.

See Also

RowsInserted

How to: Add a New Row or Column to a Worksheet

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.XtraSpreadsheet Namespace