PropertyGrid: Merging multiple dynamic properties when editing multiple objects
- by Andrei Stanescu
Hi,
Let's say I have a class A and a class B. I would like to edit using .NET PropertyGrid multiple instances of A and B simultaneously. The desired behavior would be to have the intersection of properties displayed.
If A and B have static (written in the source code) properties everything works fine. Selecting A and B instances will only display the intersection of properties.
However, if A and B also have dynamic properties (returned as a PropertyDescriptorCollection through the GetProperties() method) the behavior is wrong. When selecting multiple objects I will only see those static properties and none of the dynamic ones.
When I select only one instance I can see all properties (static and dynamic).
Anybody any ideas? I couldn't find anything on the internet.