Ticket T214493
Visible to All Users

Updating non-persistent class in detailView

created 10 years ago

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

Comments (1)
DevExpress Support Team 10 years ago

    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.

    Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

    Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.