DataGrid.CancelEdit Method ()
Invokes the CancelEditCommand command for the cell or row currently in edit mode.
Assembly: PresentationFramework (in PresentationFramework.dll)
If a cell is currently in edit mode, themethod cancels the cell edit, but not any pending row edits. If a cell is not in edit mode, cancels all pending row edits.
Available since 4.0
Available since 3.0