Updates to source list not reflected in BindingListView
Status: Beta
Brought to you by:
andrewdavey
If you update an object in the source list of a BindingListView where the list type overrides Equals, the update is not reflected by the BindingListView.
This is because the ObjectView wrappers are cached by the view using a Dictionary object. The default algorithm uses EqualityComparer.Default when hashing and comparing items, which uses the overridden Equals and GetHashCode methods of an object if they exist.
The patch proposes a change to this behaviour such that reference equality is used instead of object equality to better reflect the intent of the cache and to avoid unexpected behaviour.
Patch to alter cache comparison algorithm.