[]
        
(Showing Draft Content)

C1.Win.FlexGrid.C1FlexGridBase.FinishEditing

FinishEditing Method

FinishEditing()

Finishes editing the current cell and takes the grid out of edit mode.

Declaration
public bool FinishEditing()
Returns
Type Description
bool

True if the grid left edit mode successfully, false otherwise.

FinishEditing(bool)

Finishes editing the current cell and takes the grid out of edit mode, optionally canceling the edits.

Declaration
public bool FinishEditing(bool cancel)
Parameters
Type Name Description
bool cancel

Whether to cancel the current edits and revert the cell to its original value.

Returns
Type Description
bool

True if the grid left edit mode successfully, false otherwise.

Remarks

If the cancel parameter is set to false, the grid tries to apply the edits, and fires the ValidateEdit, LeaveEdit, and AfterEdit events as usual. If validation fails, the grid stays in edit mode (and FinishEditing() returns false).

If the cancel parameter is set to true, the original cell value is restored and the grid is guaranteed to leave the edit mode. In this case, only the LeaveEdit event fires.

To determine whether the grid is in edit mode, check whether the Editor property is null.