Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

PagedCollectionView.CancelEdit Method

Silverlight

Ends the edit transaction and, if it is possible, restores the original value of the item.

Namespace:  System.Windows.Data
Assembly:  System.Windows.Data (in System.Windows.Data.dll)

public void CancelEdit()

Implements

IEditableCollectionView.CancelEdit()

ExceptionCondition
InvalidOperationException

CanCancelEdit is false.

-or-

IsAddingNew is true.

You start an edit transaction by calling EditItem and end it by calling CommitEdit or CancelEdit.

CancelEdit sets the CurrentEditItem to null, discarding any pending changes, and causes the collection view to exit the edit state. PagedCollectionView only supports CancelEdit for items that implement the IEditableObject interface.

Use the CanCancelEdit property to test whether the edit can be canceled before you call CancelEdit.

Silverlight

Supported in: 5, 4, 3

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show:
© 2015 Microsoft