System.ComponentModel.IEditableObject.CancelEdit Method

Discards changes since the last IEditableObject.BeginEdit call.

Syntax

public void CancelEdit ()

Remarks

This method is typically used to capture the IEditableObject.CancelEdit semantics of a System.Data.DataRowView.

This method will be ignored if called on an object that is not being edited.

Note:

If the owning list implements System.ComponentModel.IBindingList, calling IEditableObject.CancelEdit on an object created using IBindingList.AddNew discards the object.

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 1.0.5000.0, 2.0.0.0, 4.0.0.0