CollectionView Editing
CollectionView provides support for editing items with the help of methods similar to those found in .NET's IEditableCollectionView interface: editItem, commitEdit, and cancelEdit.
The editItem method saves a copy of the item and puts the collection in 'edit mode'. While in edit mode, the view is not refreshed, so items are not sorted or filtered out of view during the edit process.
The commitEdit method exits the edit mode so that sorting and filtering become active again. If the item has changed, the collectionChanged event is fired to reflect the changes in the bound controls.
The cancelEdit method restores the original data and exits the edit mode.
Edit the grid below to observe how this works.
To edit the grid, double click a cell. When editing starts, a pencil icon appears on the row header to indicate that the collection is in edit mode.
To cancel the editing process, press the Escape key while editing and restore the original data.
To commit the edits, move the selection to a different row, or move the focus away from the grid. At this point, the collection is refreshed and any active filtering/sorting is applied again using the new values.