System 2.0.0.0 4.0.0.0

The interface enables a collection to add a new item in an extensible way. The new item subsequently can be committed or rolled back. The method of the collection is used to tentatively add the item, which is subsequently transacted through the following operations:

The method will explicitly commit the pending addition.

Performing another collection operation, such as an insertion, removal, or move will implicitly commit the pending addition.

The method will roll back the pending addition if it has not already been committed.

In some scenarios, such as Windows Forms complex data binding, the collection may receive or calls for items other than the newly added item. (Each item is typically a row in a data view.) Ignore these calls; cancel or commit the new item only when that item's index is specified.

There are two models that allow transactional addition of an item to a data-bound collection:

The older model relies directly on a collection that implements the interface and is data-bound directly using the class. The , , and methods of the class are responsible for transactional support for adding new items. However, this functionality depends upon the items supporting transactional behavior through the interface. If the items do not support this interface, the item will always be added to the list, regardless of subsequent calls to .

The newer model supports a more robust data-binding scenario through the generic class, which implements the and interfaces. In this case, the transactional support is managed by the collection directly.

Adds transactional capability when adding a new item to a collection.

- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The method rolls back a pending addition () of an item previously added to the collection at position . The index parameter is necessary because several new items can be simultaneously pending.

  Discards a pending new item from the collection.

  The index of the item that was previously added to the collection.
- Method
  2.0.0.0
  4.0.0.0
  System.Void ``

  The commits a pending addition () of an item previously added to the collection at position . The index parameter is necessary because several new items can be simultaneously pending.

  Commits a pending new item to the collection.

  The index of the item that was previously added to the collection.