Late instantiation of compositefield objects
FeaturedHi Dapfor Team
I have a class A with a class B as CompositeField. Both classes implement INotifyPropertyChanged.
I add object A to the grid. At this time the CompositeField is null. Later I instantiate an object B and I assign this object to the CompositeField of object A.
If now a property of object B is changed, the grid does not get the change notification. It works fine if the CompositeField is instantiated before the object A is added to the grid.
Is there a way to solve this problem?
Thanks and best regards
Ax
-
Hello,
Do you fire a notification from the A when you initialize it with an object B?
Initially the grid listens for notifications from the A and tries to get the B object. If the B is not null, the grid subscribes for notifications from B. Otherwise the grid doesn't make any subscription. If you initialize or change B without informing the grid, it doesn't resubscribe for a new B.
To resolve the problem you should notify the grid from A each time when you change the object B.
Hope this help,
Dapfor0
Please sign in to leave a comment.
Comments
1 comment