Refresh properties/sub-properties from property data accessor

Grids for WPF Forum

Posted 7 years ago by Tim Schattkowsky
Version: 12.1.0561
Avatar

Hi,

my problem is that I need the sub-properties of a property to refresh (or even change completely) when the parent property value changes. I my case, the sub-properties are in fact certain properties of the value of parent property. I am using a TypeConverter (actual type <-> string) to assign new objects here (as converted from the strings), but cannot get the sub-properties to reflect these new objects.

Technically, I have my own IPropertyDataAccessor that also implements IDataAccessorNotifier and INotifyPropertyChanged. I do recognize changes to the value, but have no idea how to forward them properly.

Firing the Notify() of IDataAccessorNotifier only causes the grid to draw a red rectangle around the parent property. (Note that the change that caused the Notify was a value update made through the grid, in case that matters.)

Firing PropertyChanged() has no visual effect (keep in mind that the directly affected item already has the new value), i.e., the grid does not attempt to update the child items. For this event, I am also not sure what sender and arguments I have to supply. I tried both forwarding directly the arguments from the original value's PropertyChanged event, which I use to detect changes, but also provided the IDataAccessorNotifier object and "Value" as the property name.

Any hints?

Best,
Tim

PS: Yes, I am using the latest version

Comments (3)

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Hi Tim,

If you inherited PropertyDataAccessorBase for your custom IPropertyDataAccessor, did you try calling RefreshChildren()?


Actipro Software Support

Posted 7 years ago by Tim Schattkowsky
Avatar

No, I did not inherit from PropertyDataAccessorBase. I just implemented IPropertyDataAccessor.

Posted 7 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar

Can you try inheriting that base class instead, and calling RefreshChildren?


Actipro Software Support

The latest build of this product (v2018.1 build 0675) was released 10 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.