Back to Devexpress

SpreadsheetControl.ColumnsInserted Event

windowsforms-devexpress-dot-xtraspreadsheet-dot-spreadsheetcontrol-7034b321.md

latest3.3 KB
Original Source

SpreadsheetControl.ColumnsInserted Event

Occurs after new columns have been added to a worksheet via the SpreadsheetControl‘s UI.

Namespace : DevExpress.XtraSpreadsheet

Assembly : DevExpress.XtraSpreadsheet.v25.2.dll

NuGet Package : DevExpress.Win.Spreadsheet

Declaration

csharp
public event ColumnsInsertedEventHandler ColumnsInserted
vb
Public Event ColumnsInserted As ColumnsInsertedEventHandler

Event Data

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

PropertyDescription
CountGets the number of columns inserted or removed.
StartIndexGets the index of the first column after which the columns are inserted or removed.

Remarks

Handle the ColumnsInserted event to perform specific actions each time an end-user inserts new columns into a worksheet via the control’s UI. After columns have been deleted from a worksheet, the SpreadsheetControl.ColumnsRemoved event is raised.

The SpreadsheetControl.RowsInserted and SpreadsheetControl.RowsRemoved events are raised on inserting and removing rows via the control’s UI, respectively.

Note

By default, the ColumnsInserted event does not occur when inserting 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 SpreadsheetControl.Options.Events.RaiseOnModificationsViaAPI notation) to true.

See Also

ColumnsRemoved

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

SpreadsheetControl Class

SpreadsheetControl Members

DevExpress.XtraSpreadsheet Namespace