Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PropertyGrid bind to Dictionary throw NotSupportedException on editor closing #1784

Open
daihung opened this issue Oct 4, 2024 · 1 comment

Comments

@daihung
Copy link

daihung commented Oct 4, 2024

Hi,

I am experiencing an issue with the PropertyGrid when binding to a Dictionary<int, object>. The binding works correctly, and I can see the keys and values. However, when I open the values collection and then click OK/Cancel, a NotSupportedException is thrown with the message: “Mutating a value collection derived from a dictionary is not allowed.”

Steps to Reproduce:

  1. Bind a Dictionary<int, object> to the SelectedObject property.
  2. Open the values collection in the PropertyGrid.
  3. OK/Cancel the changes.

Thanks.

@XceedBoucherS
Copy link
Collaborator

XceedBoucherS commented Oct 7, 2024

Hi,

Thank you for reporting this.

If you have access to the code, could you try to replace the content of
internal void PersistChanges( IList sourceList )
from file Xceed.Wpf.Toolkit/CollectionControl/Implementation/CollectionControl.cs
with the content of the attached file ?
1784.txt

to see if it help?

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants