BindingList<T>::AddingNew Event

 

Occurs before an item is added to the list.

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

public:
event AddingNewEventHandler^ AddingNew {
	void add(AddingNewEventHandler^ value);
	void remove(AddingNewEventHandler^ value);
}

The AddingNew event occurs before a new object is added to the collection represented by the Items property. This event is raised after the AddNew method is called, but before the new item is created and added to the internal list. By handling this event, the programmer can provide custom item creation and insertion behavior without being forced to derive from the BindingList<T> class.

For more information about supplying custom new item functionality, see the AddNew method. For more information about handling events, see NIB: Consuming Events.

The following code example demonstrates how to handle the AddingNew event. For the complete example, see the BindingList<T> class overview topic.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 2.0
Return to top
Show: