CommitItems Event
See Also 
Xceed.Wpf.DataGrid Assembly > Xceed.Wpf.DataGrid Namespace > DataGridVirtualizingCollectionViewBase Class : CommitItems Event

Raised when a page of data that contains edited items is about to be released from memory. This event must be handled when dealing with an editable grid.

Syntax

Visual Basic (Declaration) 
Public Event CommitItems() As EventHandler(Of CommitItemsEventArgs)
C# 
public event EventHandler<CommitItemsEventArgs> CommitItems()

Remarks

The CommitItems event is also called once for each page with modified data when the CommitAll method of the virtualizing collection view is called even if those pages are not being released from memory. By default it will be raised for each page that is about to be released from memory; however, by setting the CommitMode property to EditCommitted, this behavior can be changed to raise the CommitItems event for each item as soon as its edit process ends.

The EndCommit method of the AsyncCommitInfo instance received in the event arguments of the CommitItems event must be called when the synchronous or asynchronous update operation is completed. Until all pending commit operations are completed, the collection view will prevent theQueryItems events from being raised; therefore, it is essential that the EndCommit method be called in order to continue fetching new items once edited items have been committed. It is recommended to call the CommitAll method before the grid is unloaded so that any pending changes can be committed to the underlying data source.

Requirements

Supported Frameworks: Microsoft .NET Framework version 3.5

See Also