PropertyGrid: Merging multiple dynamic properties when editing multiple objects
        Posted  
        
            by Andrei Stanescu
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Andrei Stanescu
        
        
        
        Published on 2010-03-30T16:17:25Z
        Indexed on 
            2010/03/30
            16:23 UTC
        
        
        Read the original article
        Hit count: 667
        
propertygrid
|.NET
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.
© Stack Overflow or respective owner