C# Winforms: PropertyGrid not updated when item added to Collection
- by MysticEarth
I've got a custom class which can be edited through the PropertyGrid. In that class I've got a custom Collection (with custom PropertyDescriptor and TypeConverter).
Items can be added to or removed from the Collection with the default Collection Editor. This all works fine. But - after closing the Collection Editor, the PropertyGrid is not updated. When I manual make a call to Refresh() on the PropertyGrid, the changes are reflected in the PropertyGrid.
How can I get the PropertyGrid to automatically refresh when the Collection Editor has been closed? I sought for a solution earlier where I should subclass CollectionEditor (which I can't seem to find).
Please help.