IEditableCollectionViewAddNewItem.CanAddNewItem Property

.NET Framework (current version)
 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets a value that indicates whether a specified object can be added to the collection.

Namespace:   System.ComponentModel
Assembly:  WindowsBase (in WindowsBase.dll)

bool CanAddNewItem { get; }

Property Value

Type: System.Boolean

true if a specified object can be added to the collection; otherwise, false.

If the CanAddNewItem property is true, you can specify an object to add to the collection by calling the AddNewItem method. CanAddNewItem is false if items cannot be added to the collection by using AddNewItem. If CanAddNewItem is false, you may still be able to add an object by using the IEditableCollectionView.AddNew method. For example, you can add objects to an ADO.NET source by using AddNew, but not by using AddNewItem.

.NET Framework
Available since 4.0
Return to top
Show: