BindingList<'T>.ListChanged Event

 

Occurs when the list or an item in the list changes.

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

abstract ListChanged : IEvent<ListChangedEventHandler,
    ListChangedEventArgs>
override ListChanged : IEvent<ListChangedEventHandler,
    ListChangedEventArgs>

ListChanged notifications for item value changes are only raised if the list item type implements the INotifyPropertyChanged interface.

For more information about handling events, see NIB: Consuming Events.

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

void listOfParts_ListChanged(object sender, ListChangedEventArgs e)
{
    MessageBox.Show(e.ListChangedType.ToString());
}

.NET Framework
Available since 2.0
Return to top
Show: