Skip to main content
A newer version of this page is available. .

SpreadsheetControl.CellEndEdit Event

Occurs before the cell editor is closed and the entered value is committed.

Namespace: DevExpress.XtraSpreadsheet

Assembly: DevExpress.XtraSpreadsheet.v18.2.dll

Declaration

public event CellEndEditEventHandler CellEndEdit

Event Data

The CellEndEdit event's data class is SpreadsheetCellValidatingEventArgs. 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. Inherited from SpreadsheetCellCancelEventArgs.
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.
EditorText Gets or sets the string entered in the cell editor.
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 CellEndEdit event to perform any actions before the cell editor (the cell in-place editor or formula bar) is closed and the entered value is committed to an active cell or selected cells (when an end-user completes the cell value input by clicking outside the edited cell, or pressing ENTER, CTRL+ENTER or CTRL+SHIFT+ENTER, or the SpreadsheetControl.CloseCellEditor method is called with a passed parameter value other than CellEditorEnterValueMode.Cancel).

The Cell parameter provides access to the cell for which the cell editor is activated. The Value and Formula parameters return a value and formula currently contained in this cell. The EditorText parameter returns a string entered by an end-user to the cell in-place editor or formula bar. To prevent the cell editor from being closed, set the Cancel parameter to true.

Before the cell editor is closed, if rolling back the entered cell value is desired (for example, when an end-user presses ESC or the SpreadsheetControl.CloseCellEditor method is called with the passed CellEditorEnterValueMode.Cancel parameter), the SpreadsheetControl.CellCancelEdit event occurs.

To perform any actions before the cell editor is activated, handle the SpreadsheetControl.CellBeginEdit event.

After the cell content has been changed via the SpreadsheetControl UI, the SpreadsheetControl.CellValueChanged event occurs. You can specify whether this event should occur each time a new value is committed to a cell, or only if the committed value differs from the value before editing. This option is accessible via the SpreadsheetCellEditorBehaviorOptions.CommitMode property.

See Also