Ticket T318640
Visible to All Users
Duplicate

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

LayoutControl - A layout item becomes disabled after the layout is restored

LayoutControl disables some editors when loading a Layout

created 9 years ago (modified 9 years ago)

Hello DevExpress Support Team,

I was working with a LayoutControl to check a scenario where Editors are generated on runtime and how to replace them when a user is not supposed to view a single Editor. Therefore my Code generated 20 Editors with unique names, i designed some Layouts and saved them. Then i added a code segment replacing every third item with a panel instead of an editor. The code works as expected but when loading the Layout "Tabs.xml" (included in the sample application) the first editors in each Tab get deactivated and not reactivated when leaving the edit mode of the layout control.
I've tracked the behavior back to entering end leaving edit mode of the LayoutControl. When entering all the editors are deactivated. When leaving they should be reactivated but after changing from "2Columns.xml" to "Tabs.xml" as Layout, the two remain deactivated.
In other scenarios/layouts other controls but again one of the 5 in each Tab remains deactivated.

Is this behavior intended or is something wrong with my implementations? How to enable an editor that was disabled by the layout form?

Answers approved by DevExpress Support

created 9 years ago

Hi,

I see that you set the TextEdit.ReadOnly property to true for each 5-th editor. Thus, such editors become read-only and change their appearance settings. When you save a layout, LayoutControl does not take settings of its child controls into account. Thus, the TextEdit.ReadOnly property is not saved. I also see that you set the LayoutControlItem.Enabled property. However, this option does not relate to the TextEdit.ReadOnly property. I have recorded a video to illustrate that the same editors are grayed out regardless of what layout you restore.

It is also not entirely clear what you mean by " edit mode". Do you mean showing the Customization Form?

If I misunderstood how to see the issue, please record your own video and send it to us.

I look forward to your response.

    Comments (2)

      Hello Svetlana,
      the described behavior with Controls in ReadOnly Mode is intended. Unfortunately i'm not able to record a Video here.
      If you execute the attached Demo Project open the CustomizationForm and load the layout "Tabs.xml" there, and then close the Customization Form the first edit of each tab is completely disabled, not only ReadOnly Mode. At least that is what happens on my machine.
      Thanks for your reply and hopefully this description helps on identifying the Problem.

      DevExpress Support Team 9 years ago

        Hi,

        I have successfully reproduced the behavior you described and passed a new LayoutControl - A layout item becomes disabled after restoring layout ticket to our developers' team for further research. Please bear with us. We will notify you as soon as we make any progress.

        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.