Displaying sub properties when selecting multiple objects

Grids for WPF Forum

Posted 7 years ago by Brian K - UK
Version: 12.1.0562
Avatar

I have used a custom DataFactory to display sub properties of my selected object. This all works fine, but only when I select a single object.

When I try to display multiple objects, my data factory filters correctly, but I cannot expand the sub properties.

How can I achieve this?

Regards,

Brian

Comments (5)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Brian,

In the case where there are multiple objects selected, the PropertyGrid has to do work to see if property values between the objects are equal so that they can be displayed if they are.  When property values between the objects are not equal, the properly grid can't display a value for that particular property.  I don't believe that expansion will work in cases where there are multiple selected objects though.


Actipro Software Support

Posted 7 years ago by Brian K - UK
Avatar

Hi,

Ok, perhaps I wasnt clear on my issue.

Using the property expandibility quick start, I was able to set the property grids selected objects to multiple objects and they are still expandible. 

The property expandibility quick start uses the ExpandibleObjectconverter.

In my case I have my own data factory through which I am able to display expandible properties, but only for a single object, when I have multiple objects none of my properties are expandible.

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Brian,

You are correct, it seems that it will in fact show expansion as long as the properties are of the same type.  I did some testing and was able to make a custom DataFactory and data accessor that showed expandable sub-properties.

Basically I started with the CustomFactoryDictionary sample in making a custom data accessor.  I modfied it a bit and made sure IsMergableInternal returned true.  Then my custom factory created those objects and it all worked ok in terms of expansion of sub-properties, even when multiple objects were selected.

See if that helps, and if not, perhaps write us with a very simple sample project showing what you are trying and we can try and debug it.  Be sure to reference this post and rename the .zip file extension so it doesn't get spam blocked.  Thanks!


Actipro Software Support

Posted 7 years ago by Brian K - UK
Avatar

Excelent, I should be able to fix my code.

Any chance you could send me your sample so that I can compare my solution to yours.

Thanks in anticipation,

Brian.

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Brian,

Ok, we'll send some files over.


Actipro Software Support

The latest build of this product (v2019.1 build 0681) was released 18 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.