ComponentOne FlexPivot for WinForms
C1.Win.FlexPivot.4.5.2 Assembly / C1.Win.FlexPivot Namespace / C1FlexPivotGrid Class / FinishEditing Method / FinishEditing(Boolean) Method
Whether to cancel the current edits and revert the cell to its original value.

In This Topic
    FinishEditing(Boolean) Method
    In This Topic
    Finishes editing the current cell and takes the grid out of edit mode, optionally canceling the edits.
    Syntax
    'Declaration
     
    Public Overloads Function FinishEditing( _
       ByVal cancel As Boolean _
    ) As Boolean
    public bool FinishEditing( 
       bool cancel
    )

    Parameters

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

    Return Value

    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 C1.Win.C1FlexGrid.C1FlexGridBase.ValidateEdit, C1.Win.C1FlexGrid.C1FlexGridBase.LeaveEdit, and C1.Win.C1FlexGrid.C1FlexGridBase.AfterEdit events as usual. If validation fails, the grid stays in edit mode (and C1.Win.C1FlexGrid.C1FlexGridBase.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 C1.Win.C1FlexGrid.C1FlexGridBase.LeaveEdit event fires.

    To determine whether the grid is in edit mode, check whether the C1.Win.C1FlexGrid.C1FlexGridBase.Editor property is null.

    See Also