IEditableCollectionViewAddNewItem::AddNewItem Method (Object^)
.NET Framework (current version)
Adds the specified object to the collection.
Assembly: WindowsBase (in WindowsBase.dll)
Parameters
- newItem
-
Type:
System::Object^
The object to add to the collection.
When you calling the AddNewItem method, it begins 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.
The following example calls the AddNewItem method to add an object to a collection. For the complete example, see the IEditableCollectionViewAddNewItem class.
.NET Framework
Available since 4.0
Available since 4.0
Show: