Skip to content

[Bug]: BindingListAdaptor does not support Refresh/Evaluate for items#676

Description

@Metadorius

Describe the bug 馃悶

I noticed that when I call Refresh on an item in SourceCache, it doesn't propagate to my WinForms-based UI (it uses BindingList) it's bound to. Upon further examination of the problem I found that while SourceCache itself seems to be fine, the BindingList doesn't receive any notifications. It seems the culprit is the BindingListAdaptor which just doesn't have any sort of Refresh handling and just does nothing when Refresh comes, despite BindingList being able to handle such changes (see ResetItem; although this is just my assumption, I am still investigating):

Step to reproduce

  1. Create a SourceCache with some items.
  2. Insert a Do with logging to see the changes emitted.
  3. Bind to a BindingList.
  4. Subscribe to the binding list's change event with another logging check.
  5. Call Refresh(item) on SourceCache.

Reproduction repository

https://github.com/Metadorius/DynamicData.BindingListRefreshRepro

Expected behavior

Both SourceCache and BindingList should reflect the change.

DynamicData Version

7.12.1

Additional information 鈩癸笍

Running on .NET Framework 4.8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions