Current filter:
                                You should refresh the page.
                                  • Hi Dx tm.

                                    This is an overview of my model

                                    [C#]
                                    [DomainComponent] //Nonpersistent class public class SerieLoteDet : INotifyPropertyChanged, IObjectSpaceLink, IXafEntityObject { ................. } public abstract class TransaccionBaseObjectInventario : XPObject { ........................ public override void AfterConstruction() { base.AfterConstruction(); this.SerieLoteDets = new BindingList<SerieLoteDet>(); this.SerieLoteDets.AllowEdit = true; this.SerieLoteDets.AllowRemove = true; this.SerieLoteDets.AllowNew = true; } private BindingList<SerieLoteDet> _SerieLoteDets; [Delayed] [ValueConverter(typeof(XmlValueConverter<BindingList<SerieLoteDet>>))] public BindingList<SerieLoteDet> SerieLoteDets { set { SetPropertyValue("SerieLoteDets", ref _SerieLoteDets, value); } get { return _SerieLoteDets; } } }

                                    I tryed to add the DefaultClassOptions attribute to the NonPersistent class and I modified the default ListView to AllowEdit true and NewItemRowPosition to Top. In the default listview the New Row is shown and I can add new items to the ListView (of course they are not persisted as expected) but when I use the same view in a DetailView of my persistent class, the ListView does not show the New Row, so the user cannot add items to my BindingList directly.

                                    Am I missing something? I have also tryed to adapt this code
                                    https://documentation.devexpress.com/#eXpressAppFramework/CustomDocument115672

                                    But unsuscessfully...
                                    Thanks

                                2 Solutions

                                Creation Date Importance Sort by

                                Hello,

                                I have finally replicated this behavior using the FeatureCenter.Win app (refer to the attached code file). It occurs only when you have a persistent root object with a non-persistent collection. I somehow missed this important fact from your original message and I apologize for the inconvenience as I previously tested a scenario when both root and nested objects were non-persistent.

                                Your configuration is currently unsupported, because full CRUD capabilities for non-persistent objects are available only when they are manipulated inside NonPersistentObjectSpace. In your particular case, this non-persistent ListView is linked to the XPObjectSpace.
                                That said, we can only recommend you try the following solution for the current version -  display a separate root ListView with your non-persistent objects, e.g. in a tab, as per the Task-Based Help > How to: Display a Non-Persistent Object's List View from the Navigation article.

                                Thanks for your question, Sebastian. This functionality operates correctly in my tests with the FeatureCenter app. Please refer to the C:\Users\Public\Documents\DevExpress Demos 16.2\Components\eXpressApp Framework\FeatureCenter\CS\FeatureCenter.Module\NonPersistentObjects\NonPersistentObjects.cs file and the attached screenshot. To enable the inplace editing and new item row features, I modified the demo class as follows:

                                [C#]
                                [DefaultListViewOptions(true, NewItemRowPosition.Top)] public class NonPersistentClassWithPersistentProperty : NonPersistentClassWithKeyProperty {

                                I hope this demo will be a solution for you.

                                If not, please post the full source code for your SerieLoteDet class and a Controller that creates its instances, because it is important to see the details of their implementation, e.g. whether you have a key property and this property contains only unique values. I must also note that there must be the SetDelayedPropertyValue call instead of the SetPropertyValue once in the SerieLoteDets property (refer to the DelayedAttribute documentation for more details).

                                • Sebastian Ortiz 03.27.2017
                                  Hi Dennis

                                  I tryed with your solution with no success, I have to add that my nested view is in a Popup Window, as you can see in the Screenshot, this seems to cause the problem with the NewRow, because I tryed to open the view in a regular view as a tab and it worked.

                                  This is the code I have used to create de Popup based on the selected object in a ListView:

                                  [C#]
                                  void SeriesLotesPopupAction_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e) { TransaccionBaseObjectInventario tx = this.View.CurrentObject as TransaccionBaseObjectInventario; IObjectSpace objectSpace = this.ObjectSpace.CreateNestedObjectSpace(); e.View = Application.CreateDetailView(objectSpace, "TransaccionBaseObjectInventario_DetailView", true, transaccionActual = objectSpace.GetObject(tx)); }
                                  The selected object is the one that has the NonPersistObject list.


                                  Do you have any ide of what could be happening? Temporaly I had to add a controller in order to Add a new record in the Popup list, but this is so annoying for users for obvious reasons, the agility to input info is not the same.
                                  Thanks.
                                • Dennis (DevExpress Support) 03.28.2017

                                  Hello Sebastian,

                                  I need some additional time to perform tests with the popup window in FeatureCenter, though it does not look like this is a significant detail here. To speed up finding a solution, feel free to attach a small debuggable project where you are having this issue, because it can be related to your project settings. Thanks.