Share via


PagedCollectionView.CommitEdit Method

Microsoft Silverlight will reach end of support after October 2021. Learn more.

Ends the edit transaction and saves the pending changes.

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

Syntax

'Declaration
Public Sub CommitEdit
public void CommitEdit()

Implements

IEditableCollectionView.CommitEdit()

Exceptions

Exception Condition
InvalidOperationException

IsAddingNew is true.

Remarks

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

CommitEdit sets the CurrentEditItem to nulla null reference (Nothing in Visual Basic), saves any pending changes, and causes the collection view to exit the edit state. Any filtering, sorting, or grouping that is applied to the view is applied to the edited item when CommitEdit is called.

Version Information

Silverlight

Supported in: 5, 4, 3

Platforms

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