Ticket Q371978
Visible to All Users

RestoreLayout not working in WPF GridControl

created 12 years ago (modified 12 years ago)

Restore Layout from xml is not working properly in some controls. I am able to save layout using SaveLayoutToXml('filename') but once i try to restore saved layout using RestoreLayoutFromXml('filename'), it is not getting reflected in grid. Please suggest.

Thanks.

Comments (1)
JS JS
Jyotdeep Singh 2 12 years ago

    Hi,
    I am trying to implement the same functionality (save and load layout) for GridControl and TreeListControl as well. But, these settings are not having any effect.
    Can you please suggest, how do I achieve this functionality for Grid and TreeList controls?
    Thanks,
    Jyotdeep Singh

    Answers approved by DevExpress Support

    created 12 years ago (modified 12 years ago)

    Hi Jyotdeep,
    Thank you for your inquiry. As far as I understand your scenario, you can achieve this goal by setting the DXSerializer.StoreLayoutMode property as shown in the Saving and Restoring Layout help article. Please try this option and let me know if you need additional assistance.
    Thanks

      Show previous comments (1)
      DevExpress Support Team 12 years ago

        Thank you for the clarification. At the moment, our serializer does not allow saving templates. You can avoid this issue by using approaches suggested in the Specifying a HeaderTemplateSelector for columns restored from a Layout thread. Please take a moment to review it and feel free to reactivate this thread if you have additional questions.
        Thanks

        JS JS
        Jyotdeep Singh 2 12 years ago

          Hi,
          I followed an approach similar to the second one suggested in above mentioned link. The UI works fine, I was able to add templates when columns were added.
          Now, I have another issue. When the cell template is assigned this way, the modifications done by the template is not reflected in print preview or excel export. These functionality were working fine earlier.
          Can you please tell me why this behavior is appearing, and how do I resolve this?

          DevExpress Support Team 12 years ago

            Hi,
            The CellTemplate is not applied when you print the GridControl. You need to use the PrintCellTemplate property for setting printing appearance.
            Feel free to contact us if you need additional information. I will be glad to help you.
            Thanks

            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.