Ticket T710434
Visible to All Users
Duplicate

We have closed this ticket because another page addresses its subject:

Core - Design-time Model Editor does not take Entity Framework class metadata into account

Issue with ASP.NET EF XAF application with text fields more than 255 chars

created 6 years ago

Hi.

I am having a strange issue on my Entity Framework ASP.NET XAF application.

For some reason all nvarchar(255) fields and longer are being displayed twice in a detail form in runtime.

One as a simple label and second and a label + multiple row field. (Please see screenshot)
Also, when this happens the label + multiple row edit does not render inside the place that was defined during design time, it always renders at root level in the detail form

While on the design time i only see the field once as expected.

The only workaround i have found is to set the length to <255 and then set the row count of that property in XAF to more > 1

Answers approved by DevExpress Support

created 6 years ago

Hello.

It seems that you customized this detail view in Model Editor. Currently, the metadata information on Entity Framework classes and their properties is not propagated to the Model Editor at design time. As a result, the view model show in the designer is different than the runtime model and customizations might be applied incorrectly. Please refer to the T695360 - Detailview layout set in model not match with the UI ticket where a similar issue was discussed and try the suggested workaround. If this doesn't help, send us a sample project demonstrating the issue.

    Comments (3)

      Hi

      I have not modified the detail view in the Model Editor. I even did a reset of the layout to make sure its not my fault.

      I think this issue has to do when XAF tries to replace the simple text box control with the multiline textbox control automatically for fields >255 chars in length

      When i change the length of the field to 254 chars the problem resolves automatically.

      FYI: The multiline text box that gets generated always sits on the root layout group even if i move the filed on another "Tab" within the layout.

      DevExpress Support Team 6 years ago

        Thank you for your reply. However, this information is insufficient to research the issue. I couldn't reproduce this issue without modifying the view model. Please provide us with a a small sample project demonstrating the issue.

        AG AG
        Alex Gn (DevExpress) 6 years ago

          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.

          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.