IEditableObject.CancelEdit 方法

定義

捨棄從上次 BeginEdit() 呼叫以來所做的變更。Discards changes since the last BeginEdit() call.

public:
 void CancelEdit();
public void CancelEdit ();
abstract member CancelEdit : unit -> unit
Public Sub CancelEdit ()

備註

這個方法通常用來捕捉CancelEdit的語法。 DataRowViewThis method is typically used to capture the CancelEdit semantics of a DataRowView.

如果在未編輯的物件上呼叫此方法, 則會予以忽略。This method will be ignored if called on an object that is not being edited.

注意

如果擁有的清單IBindingList已執行, 則在使用IBindingList.AddNew建立的物件上呼叫CancelEdit會捨棄物件。If the owning list implements IBindingList, calling CancelEdit on an object created using IBindingList.AddNew discards the object.

適用於