SpreadsheetControl.CellBeginEdit Event
Occurs before the cell editor is opened.
Namespace: DevExpress.XtraSpreadsheet
Assembly: DevExpress.XtraSpreadsheet.v18.2.dll
Declaration
Event Data
The CellBeginEdit event's data class is SpreadsheetCellCancelEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Cancel | Gets or sets whether the operation performed on the processed event should be canceled. |
Cell | Gets the cell for which the event is fired. Inherited from SpreadsheetCellEventArgsBase. |
ColumnIndex | Gets the index of the column that contains the cell. Inherited from SpreadsheetCellEventArgsBase. |
Formula | Gets the formula that is currently contained in the cell. Inherited from SpreadsheetCellEventArgsBase. |
FormulaInvariant | Gets the formula in the invariant culture that is currently contained in the cell. Inherited from SpreadsheetCellEventArgsBase. |
RowIndex | Gets the index of the row that contains the cell. Inherited from SpreadsheetCellEventArgsBase. |
SheetName | Gets the name of the worksheet that contains the cell. Inherited from SpreadsheetCellEventArgsBase. |
Value | Gets the value currently contained in the cell. Inherited from SpreadsheetCellEventArgsBase. |
Worksheet | Gets the worksheet that contains the cell. Inherited from SpreadsheetCellEventArgsBase. |
Remarks
Handle the CellBeginEdit event to perform any actions before the cell editor (the cell in-place editor or formula bar) is activated by an end-user. To access the cell for which the cell editor is about to be invoked, use the Cell parameter. A value and formula currently contained in this cell are returned by the Value and Formula parameters, respectively.
To prevent cell content from being modified via the cell in-place editor or formula bar, handle the event and set the Cancel parameter to true.
The SpreadsheetControl.CellEndEdit or SpreadsheetControl.CellCancelEdit event occurs before the cell editor is closed, depending on whether the entered cell value should be committed or rolled back.
Related GitHub Examples
The following code snippets (auto-collected from DevExpress Examples) contain references to the CellBeginEdit event.
Note
The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.