ListCollectionView.AddNewItem(Object) ListCollectionView.AddNewItem(Object) ListCollectionView.AddNewItem(Object) ListCollectionView.AddNewItem(Object) Method

Definition

Adds the specified object to the collection.

public:
 virtual System::Object ^ AddNewItem(System::Object ^ newItem);
public object AddNewItem (object newItem);
abstract member AddNewItem : obj -> obj
override this.AddNewItem : obj -> obj
Public Function AddNewItem (newItem As Object) As Object

Parameters

newItem
Object Object Object Object

The object to add to the collection.

Returns

The object that was added to the collection.

Exceptions

Remarks

Calling the AddNewItem method starts an add transaction. You should call the CommitNew or CancelNew methods to end the add transaction. A new item always appears in the collection view. Any filtering, sorting, or grouping that is applied to the view is applied to the new item when CommitNew is called.

Applies to

See also