Hello.
I have a controller that is loading a form of a Non-Persistent xpObject (cardContinousRecord.cs). This object has:
- "Card" that is a persistent XpObject
- "CardElements" that is an XPCollection of a Non-Persistent xpObjects. This objects will be partially filled with information of Card.,
The problem I have is that in the "cardContinousRecord" DetailView, when I change the property "Card" , the "CardElements" list is not updated in the view.
I've tried to trigger it overwriting the OnChanged() function and also creating another controller and adding the event in OnActivated() function without success.
Is it possible to do that a non-persistent class is updating another non-persistent class?
Thanks
Hello Rosa.
The information you provided is insufficient to diagnose this issue. To achieve automatic UI updates according to property changes, implement the standard INotifyPropertyChanged interface in your non-persistent class. I also strongly recommend that you do not inherit your non-persistent classes from base XPO/XAF persistent classes and do not use XPCollection to represent a collection of non-persistent objects. Refer to the How to: Display a List of Non-Persistent Objects article to learn the recommended approach of a non-persistent class implementation.
Please take time to change your code according to these recommendations. If the issue persists, please provide us with a small sample project demonstrating it.