Refresh IsModified property?

Grids for WPF Forum

Posted 14 years ago by Cheetah
Version: 9.2.0515
Platform: .NET 3.5
Environment: Windows 7 (32-bit)
I've found what I think is a bug in the PropertyGridDataAccessor.Refresh method, or possibly with the OnValue(s?)Changed method.

I ran into this via two routes:

1) I have some remaining degenerate scenarios in my app where the object exposed on the grid has properties changed without sending PropertyChanged events. I currently work around these scenarios by calling Refresh() on all the PropertyGridDataAccessor items when one occurs (calling Refresh on the grid itself does too deep a rebuild, loses selection context and such).

2) I have some properties that are objects implementing ICustonTypeDescriptor and which have a TypeConverter deriving from ExpandableObjectConverter. I added code so that the child properties all express the NotifyParentPropertyAttribute, and that does make the value of the parent property refresh.

The bug is that, in both of these scenarios, the IsModified nature of the properties does not refresh. For example, if I have a property under scenario 2 set to its default, expand it, and change a child property, the value displayed on the parent property row refreshes, but the bold-ness doesn't refresh, and I can see in the debugger that the corresponding PropertyGridDataAccessorItem has IsModified == false, and IsModifiedInternal == true.

The same scenario happens when calling Refresh on a PropertyGridDataAccessorItem whose underlying property changed "silently", the value updates, but IsModified does not.

Comments (2)

Posted 14 years ago by Cheetah
Nevermind, this was a bug in my code, at least scenario #2 was, property change event handlers weren't bound correctly on the ICustomTypeDescriptor object.
Posted 14 years ago by Actipro Software Support - Cleveland, OH, USA

If you still need us to look into scenario #1, then please put together a small sample project that reproduces the issue and email it over to our support address. Make sure to rename the zip extension (to say z_p), to avoid it getting rejected by our email servers.

Actipro Software Support

The latest build of this product (v24.1.2) 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.