Επεξεργασία

Κοινή χρήση μέσω


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

The object to add to the collection.

Returns

The object that was added to the collection.

Implements

Exceptions

An object cannot be added to the ListCollectionView by using the AddNewItem(Object) method.

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