DataGridView.CancelEdit Method ()
Cancels edit mode for the currently selected cell and discards any changes.
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
The following code example illustrates the use of this method. This example is part of a larger example available in Column Fill Mode in the Windows Forms DataGridView Control.
Available since 2.0