BindingList<'T>.ListChanged Event

 
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.

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: