Share via


Expanding List in PropertyGrid

Question

Tuesday, July 1, 2008 5:29 PM

How, do you display a List<> of custom objects in the PropertyGrid in which each List Item can be expanded to display the custom objects properties. (ie:

PropertyGrid

CoreClass

(+/-) List<CustomClass>

(+/-) CustomClass.Object1

Property1

Property2

PropertyN

(+/-) CustomClass.Object2

Property1

Property2

PropertyN

I created a custom TypeConverter to display the properties of CustomClass, but I can’t figure out how to write the TypeConverter to expand the List<CustomClass> to allow the CustomClass properties per item to be displayed.

I don’t care about implementing the Collection Editor as the CustomClass should not be modified by the user.

I have looked across many articles including those on MSDN, but none seem to provide a fit solution. I know this question is somewhat general. Please advise.

Thanks.

All replies (1)

Tuesday, July 1, 2008 5:46 PM ✅Answered

This should get you started:
http://www.codeproject.com/KB/tabs/customizingcollectiondata.aspx


Marc