textbox property editor and expander

Grids for WPF Forum

Posted 15 years ago by Rick Edwards - UK
Version: 9.1.0500
Hi all,

when I have a string property that appears in the PropertyGrid an expander symbol appears next to it in a similar fashion to a category. This expands out to give me another list of the same properties with all the strings having expanders by them and so on and so forth.

I've tried explicitely declaring the TypeEditor to use as TextBoxPropertyEditor on the property but to no avail:
[Editor(typeof(TextBoxPropertyEditor), typeof(PropertyEditor))]
I am using a custom DataFactory with CustomDataAccessors but this is only to change the read only property so doesn't do much. I should add I'm binding to a SelectedObject and it's picking up the properties okay, just gives me this strange behaviour when the property is a string. What determines whether an "expandable" symbol appears for a property or not?

Any ideas?


[Modified at 06/18/2009 08:31 AM]

Comments (1)

Posted 15 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Rick,

The DataFactory is used to enumerate the properties on the SelectedObject(s) *and* it's properties. So if your object has PropertyA and PropertyB, then you should see three class to your DataFactory: 1 for SelectObject, 1 for PropertyA, and 1 for PropertyB.

I suspect that you are returning the same list of properties for all three calls. If the DataFactoryOptions.ParentAccessor is null, then the current call is for the SelectObject(s).

Hope this helps.

Actipro Software Support

The latest build of this product (v24.1.2) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.