Current filter:
                                You should refresh the page.
                                  • Description:
                                    Generally, the binding works properly. But if a persistent class inherits XPBaseObject or one of its descendants (XPCustomObject, XPLiteObject, XPObject), the user cannot clear the editor's value. The editor displays the validation error when accepting an empty value.
                                    Binding to Nullable properties works correctly if a persistent class inherits PersistentBase.

                                    XPCollection and Base XPO Classes are designed to provide backward compatibility with legacy DataSet-based WinForms applications. These classes make the migration to XPO easy. WPF is a modern platform that does not use most of the functionality used in WinForms binding. Moreover, some features can cause unwanted side effects.

                                    We suggest using DevExpress.Xpo.PersistentBase as the base class for your persistent classes in WPF applications. This solution is applicable even if you plan to share the business model library with applications based on the WinForms platform. This is because you actually do not need the compatibility with DataSet in applications created from scratch.

                                    Q: What functionality I will loose if I change the base class to PersistentBase?
                                    A: XPObject, XPCustomObject, and XPBaseObject are "thin" classes. Each of them implements only one specific feature and inherits the remaining functionality from the PersistentBase class. Features implemented in these classes can be enabled using attributes.
                                      1. The automatically incremented OID property. Add a property of the Int32 type to your class and decorate it with the Key attribute.
                                      2. Optimistic Locking. Decorate your class with the OptimisticLocking attribute.
                                      3. Deferred Deletion (GC column). Decorate your class with the DeferredDeletion attribute.

                                    We suggest that you implement a custom base class in order not to repeat these steps in all persistent classes. Decorate your class with the NonPersistent attribute and use it as a base class for other classes.

                                    [NonPersistent] [DeferredDeletion] [OptimisticLocking] public class BaseObject :PersistentBase { public BaseObject(Session session) : base(session) { } [Key(true)] [Persistent("OID")] private int fOid; [PersistentAlias("fOid")] public int Oid { get=> fOid; } }
                                    <NonPersistent, DeferredDeletion, OptimisticLocking> Public Class BaseObject Inherits PersistentBase Public Sub New(ByVal session As Session) MyBase.New(session) End Sub <Key(True), Persistent("OID")> Private fOid As Integer <PersistentAlias("fOid")> Public ReadOnly Property Oid() As Integer Function(get) fOid End Property End Class

                                0 Solutions

                                Creation Date Importance Sort by