Question

Need help with PropertyGrid.

I have List of CustomClass to display it in PropertyGrid Control. I want to modify CustomClass instance's properties right in the propertygrid. (Condition is that there shouldn't be editors). Using ExpandableObjectConverters and PropertyDescriptors as shown in related article, i can modify every CustomClass instances in List by expanding it to properties. But my goal is to modify CustomClass properties in it's row without expanding. (Example behaviour you can find for SomeControl Size property in VS Control Properties View)

How can i edit expandable objects in root row?

image from article

Detail question for this picture: How to change Max Headroom from it's "Sales, Manager" to "Sales, Director" without expanding. (my problem that this row is readonly field)

Related article: http://www.codeproject.com/Articles/4448/Customized-display-of-collection-data-in-a-Propert?msg=4745311#xx4745311xx I've posted a question there too (no answer yet).

I can generate some basic code sample if it's too complicated.

No correct solution

OTHER TIPS

You have to create custom ExpandableObjectConverter and override the CanConvertFrom and ConvertFrom method to enable editing of Max HeadRoom object's string representation.

Check the SpellingOptionsConverter in this MSDN example.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top