Dear Support,
I found that the Detailview layout set in model not match with the UI.
Please check attached document for my setting.
We have closed this ticket because another page addresses its subject:
Core - Design-time Model Editor does not take Entity Framework class metadata into accountDetailview layout set in model not match with the UI
Answers approved by DevExpress Support
Hello Horace,
DetailView layout items are generated based on the Layout node of the corresponding DetailView model. If certain items do not exist in the Application Model, they won't be added to the DetailView by default. If this happens, they either exist in the resulting Application Model, or are added at runtime through controls customization. I suggest that you research the issue as follows:
- Check this DetailView's Model at runtime. For example, you can create a ViewController and check the View.Model property in its OnActivated method.
- If the unwanted items do not exist in the Layout node, the corresponding controls are likely added at runtime in your or third-party code.
3. If these items exist in the Layout node, check if they exist before user model settings are loaded. You can do this in the XafApplication.SetupComplete event handler. If the items do not exist there, this means that they were added to the Application Model at runtime and are stored in User Model Differences. - If these items already exist in the SetupComplete event handler, check the application's XAFML files in the following order: Application.Web, Application.Module.Web, Application.Module. Find where these items are added or removed and ensure that these settings are not overridden in higher-level model files. Also, ensure that other settings from these XAFML files have effect on the application - with incorrect settings, an entire XAFML file can be ignored.
If this does not help, provide a sample project where the issue can be reproduced.
Actually "SupplierEmailAddress" is the one that i added later after i constructed the layout of the detail view. and it comes out automatically below the tabs.
I have attached those module files for your to check. I searched using "SupplierEmailAddress" in those module and i did only found the one that is in the tab but not under the tab. there are no view controller manipulate those detailview also.
Please support.
Hello Horace,
Thank you for the additional information. I have managed to reproduce this issue. It occurs because the Remark and SupplierEmailAddress properties are decorated with the MaxLength attribute. At design time, they appear in the SimpleEditors group, but at runtime - in the SizeableEditors group. This happens because of specificities of collecting EF metadata in XAF. As a result, the runtime DetailView model has two layout items mapped to the same property - one item is created by you during layout customization, and another is generated automatically for the SizableEditors group. The easiest way to resolve the issue is to hide default-generated items by applying the VisibleInDetailView(false) attribute to these properties.
I have also created a separate ticket to research this issue further: Core.EF - Large properties decorated with the MaxLength attribute cannot be hidden in the Model Editor.
With the version 18.2.6 we provided the capability to fix this issue on your side. Please refer to the Core - Design-time Model Editor does not take Entity Framework class metadata into account for more details.