I have a list in Propertygrid that opens by expander. I created it using the following site: Customized display of collection data in a PropertyGrid.
I added this Editor Type to cancel the Collection Editor
:
class MyEditor: UITypeEditor
{
public override UITypeEditorEditStyle GetEditStyle(ITypeDescriptorContext context)
{
return UITypeEditorEditStyle.None;
}
}
[TypeConverter(typeof(ExpandableObjectConverter))]
[Editor(typeof(MyEditor), typeof(UITypeEditor))]
public class MyCollection : CollectionBase, ICustomTypeDescriptor
{...}
The problem is you can not edit the values in the collection via the Expander.
I have two questions:
Why the Expander appears as disable editing?
How can I allow the user to edit via Expander?