DataGridView.EndEdit Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Commits and ends the edit operation on the current cell.
Overloads
EndEdit() |
Commits and ends the edit operation on the current cell using the default error context. |
EndEdit(DataGridViewDataErrorContexts) |
Commits and ends the edit operation on the current cell using the specified error context. |
EndEdit()
Commits and ends the edit operation on the current cell using the default error context.
public:
bool EndEdit();
public bool EndEdit ();
member this.EndEdit : unit -> bool
Public Function EndEdit () As Boolean
Returns
true
if the edit operation is committed and ended; otherwise, false
.
Exceptions
The cell value could not be committed and either there is no handler for the DataError event or the handler has set the ThrowException property to true
.
Remarks
This method calls the EndEdit overload, passing in a bitwise combination of the Parsing and Commit values.
This method raises the CellEndEdit event.
This method may result in an exception if errors are not handled with the DataError event.
See also
- EndEdit(DataGridViewDataErrorContexts)
- CommitEdit(DataGridViewDataErrorContexts)
- DataGridView Control (Windows Forms)
Applies to
EndEdit(DataGridViewDataErrorContexts)
Commits and ends the edit operation on the current cell using the specified error context.
public:
bool EndEdit(System::Windows::Forms::DataGridViewDataErrorContexts context);
public bool EndEdit (System.Windows.Forms.DataGridViewDataErrorContexts context);
member this.EndEdit : System.Windows.Forms.DataGridViewDataErrorContexts -> bool
Public Function EndEdit (context As DataGridViewDataErrorContexts) As Boolean
Parameters
- context
- DataGridViewDataErrorContexts
A bitwise combination of DataGridViewDataErrorContexts values that specifies the context in which an error can occur.
Returns
true
if the edit operation is committed and ended; otherwise, false
.
Exceptions
The cell value could not be committed and either there is no handler for the DataError event or the handler has set the ThrowException property to true
.
Remarks
This method raises the CellEndEdit event.
This method may result in an exception if errors are not handled with the DataError event.