Add item button not shown for collections

Grids for WPF Forum

Posted 12 years ago by Oliver Maunder
Version: 11.1.0542
Avatar
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

Comments (1)

Posted 12 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Olly,

I believe this issue was addressed in the WPF Studio 2011.2 release. Please try to verify that it is indeed fixed there.

The change item is "Fixed issue with IPropertyDataAccessor's CanAddChild and CanRemove not being refreshed when the associated property changes".


Actipro Software Support

The latest build of this product (v24.1.1) was released 2 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.