If the data source implements an IBindingList inteface, then the BindingSource will be informed about adding or removing elements to the data source. A good implementation is BindingList<T> .
Also, if data source elements implement INotifyPropertyChanged , then the BindingSource will also be notified of changes to the elements.
In the above cases, the ListChanged event will be raised.
Note
- Please note: if you assign
someBindingSource.DataSource = someThing; , and then someThing = new SomeThing(); , since someBindingSource.DataSource points to the previous object, there are no changes, and there will be no notifications. Event DataSourceChanged will be created after you assign a new DataSource BindingSource value, so after someThing = new SomeThing(); in the previous situation, if you do someBindingSource.DataSource = someThing; , then DataSourceChanged will be raised.
source share