System.Windows.Forms.CurrencyManager.CancelCurrentEdit Method

Cancels the current edit operation.

Syntax

public override void CancelCurrentEdit ()

Remarks

This method is supported only if the objects contained by the data source implement the System.ComponentModel.IEditableObject interface. If the objects contained within the data source do not implement the System.ComponentModel.IEditableObject interface, changes made to the data will not be discarded.

Note:

This property was designed to be used by complex data-bound controls, such as the System.Windows.Forms.DataGrid control, to cancel edits. For example, when the user presses the ESC key, the CurrencyManager.CancelCurrentEdit method is called on the System.Windows.Forms.CurrencyManager for the System.Windows.Forms.DataGrid. Unless you are creating a control that requires this same functionality, you should not use this method. Instead, use the System.Data.DataRowView.CancelEdit method of the System.Data.DataRowView class.

Requirements

Namespace: System.Windows.Forms
Assembly: System.Windows.Forms (in System.Windows.Forms.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0