How to display string collections with custom factories and data accessors?

Grids for WPF Forum

Posted 11 years ago by Ernie Bahr - Founder and Chief Software Architect, ECMG, LLC.
Version: 12.2.0573
Avatar

Hello All,

I hope that Actipro is monitoring this as well.  I have been working on an implementation using the proeprty grid that uses a custom factory and some custom data accessors.  I am very happy with the result except for one thing.  Some of the properties I am trying to display are string collections but for those I am unable to get any value to display at all.  I am guessing that since I am using costom factories and data accessors that I need to take more responsibility for getting these collections to display in the property grid.  However, none of the samples I have been able to find addres this scenario.

 

Does anyone have any ideas for how to do this?

Comments (3)

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

Hi Ernie,

It's hard to say without seeing what you are doing, but all of our IPropertyDataAccessor implementions used by our built-in factories are available for your own use. Collections in particular use the CollectionPropertyDescriptorDataAccessor implementation. This should allow you to display your string collection in any custom hierarchy/location you want.

Depending on your needs and if you derive your custom data factory from our DataFactory (or one one of it's concrete derivations: TypeDescriptorFactory and TypeReflectionFactory) class, you can also just call the DataFactory.CreateCollectionPropertyDataAccessor method. This allows you to mostly reuse our default factories, while still injecting custom logic/accessors/etc.

If you can explain better what your data looks like and how you'd like it to be displayed in the PropertyGrid, we may be able provide more details.


Actipro Software Support

Posted 11 years ago by Ernie Bahr - Founder and Chief Software Architect, ECMG, LLC.
Avatar

I can send some screen shots showing the property grid as implemented along with information about the class the data is coming from.  I did not see how to add any attachments or images to my original post.

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

Hi Ernie,

You'd need to email our support address with them.  Please reference this thread in your email.  Thanks!


Actipro Software Support

The latest build of this product (v24.1.3) was released 28 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.