Hi
In my property grid I'm making some properties read-only based on the value of other properties, using the technique described here.
This works well but I'm having a problem with the display of the "Add New" button for collection properties. The CollectionDisplayMode is set to EditableInline.
When a writeable collection property is made read-only, the add new button is disabled. When that collection property is made writeable, the add new button is re-enabled. So far, so good.
However, if a collection property is read-only when the property grid is first displayed, then the add new button isn't shown. When the collection property is made writeable, the add new button isn't enabled because it's not there.
Some pictures may help to illustrate:
1. The collection is writeable, the add new button is active -
image
2. The collection is read-only, the add new button is disabled - image
3. The collection is read-only when the property grid is displayed. There is no add new button - image
Is there anything I can do to force the add new button to be displayed?
Thanks for your help
Olly
In my property grid I'm making some properties read-only based on the value of other properties, using the technique described here.
This works well but I'm having a problem with the display of the "Add New" button for collection properties. The CollectionDisplayMode is set to EditableInline.
When a writeable collection property is made read-only, the add new button is disabled. When that collection property is made writeable, the add new button is re-enabled. So far, so good.
However, if a collection property is read-only when the property grid is first displayed, then the add new button isn't shown. When the collection property is made writeable, the add new button isn't enabled because it's not there.
Some pictures may help to illustrate:
1. The collection is writeable, the add new button is active -
image
2. The collection is read-only, the add new button is disabled - image
3. The collection is read-only when the property grid is displayed. There is no add new button - image
Is there anything I can do to force the add new button to be displayed?
Thanks for your help
Olly