System.ComponentModel.BindingList<T>.OnAddingNew Method

Raises the BindingList`1.AddingNew event.

Syntax

protected virtual void OnAddingNew (AddingNewEventArgs e)

Parameters

e
An System.ComponentModel.AddingNewEventArgs that contains the event data.

Remarks

The BindingList`1.AddingNew event and the BindingList`1.AddNew method allow custom-created items to be added to the list.

Raising an event invokes the event handler through a delegate. For more information, see Raising an Event.

The BindingList`1.OnAddingNew(AddingNewEventArgs) method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.

Requirements

Namespace: System.ComponentModel
Assembly: System (in System.dll)
Assembly Versions: 2.0.0.0, 4.0.0.0