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

                                    In a ASP.NET Xaf application with EF , I have a RuleCriteria set to Delete context and with Warning result but that is only working on the DetailView. So the warning is displayed after the Delete action is clicked.

                                    The problem is that in the ListView of the same object this Validation rule is non existent. It just deletes the object without displaying anything.

                                    FYI: My Criteria is always set to 1<>1 so it should always fire

                                    I am missing something here ?

                                    Can you please advice ?


                                Show all comments
                                • Alex Gn (DevExpress) 02.12.2019

                                  Would you clarify whether you use the DataView or InstantFeedback mode in this ListView?

                                • bbirbo 02.12.2019


                                  This issue is happening on 5 different Listviews that i tried so far.

                                  All settings are XAF Defaults.

                                  DataAccessMode is set to  Client

                                • Alex Gn (DevExpress) 02.12.2019

                                  We have reproduced the described behavior only in the DataView mode and will fix it. To check whether your scenario is different, please handle the CustomDeleteObjects event and check objects in the args.Objects collection. If this collection contains objects of the XafDataViewRecord type, then the DataView mode is set by default in your application options. If the collection contains real objects, please provide us with a simple project demonstrating the issue or steps to reproduce it on our demo.
                                  I am looking forward to your results.

                                • bbirbo 02.12.2019

                                  My ListViews are not using DataView mode for loading the data.

                                  I also noticed that this issue only happens when the ListView is the root view.

                                  I tried on a nested view and it works as expected.

                                • Alex Gn (DevExpress) 02.13.2019

                                  As I mentioned before, we cannot reproduce the described behavior. In our demo, the validation works as expected. See the attached video. To research the issue, we need a simple project demonstrating it or detailed instructions on how to reproduce it in our demo. If you cannot provide this information, try to research the issue on your side as follows.
                                  The PersistenceValidationController performs the validation in a ListView. Handle the DeleteContextValidating and NeedToValidateObject events and check their arguments to make sure that the object to be deleted is in the validation list.
                                  See the Collect and Analyze the Diagnostic Information article for more details.
                                  If you face difficulties when collecting this information, share your results with me and I will do my best to help you.

                                • bbirbo 02.13.2019

                                  Please take a look at the attached image

                                • bbirbo 02.13.2019

                                  This one too

                                • Alex Gn (DevExpress) 02.13.2019

                                  If I understand it correctly, the "Akinito" object in your screenshot is the one you deleted in the list view. If so, do the following to further research the issue.
                                  Your object seems to pass validation. To find why it happens, handle the DevExpress.Persistent.Validation.Validator.RuleSet.CustomValidateRuleand DevExpress.Persistent.Validation.Validator.RuleSet.CustomNeedToValidateRule events and check that the deleted object is validated. Handle the DevExpress.Persistent.Validation.RuleSet.RuleValidated event to check the validation results. Compare them with results you have when the object is deleted in DetailView. You can also step through our code using PDB files as described in the How can I debug DevExpress .NET source code using PDB files article.
                                  If you do not find the source of this behavior with the provided recommendations, please share your results and provide the source code of your class (Akinito) and the validation rule.
                                  I am looking forward to your results.

                                0 Solutions

                                Creation Date Importance Sort by