Ticket S32444
Visible to All Users

Core - Provide an easy way to store administrator and user model differences in a custom store (e.g., in a database)

created 16 years ago

See the proposed solution.
Proposed Solution:
I desire that we introduce an option in the XafApplication class that would provide at least three predefined methods of storing the model user differences:

  1. in the file system for Win and Web applications (this is the Model.User.xafml file in a Windows Forms application, or a folder with the ID of the current user on the server in a Web Forms application)
  2. in the database ( How to: Store Model Differences in Database ) for both platforms
  3. in a custom store (as in the browser cookies for a Web application)
Show previous comments (2)
Dennis Garavsky (DevExpress) 11 years ago

    @Matteo: Sure, you are free to modify this example code as your business needs dictate.

      Which part of the function can I comment out without risk to introduce a misbehavior? Thank you.

      Dennis Garavsky (DevExpress) 11 years ago

        @Matteo: I am afraid it is not a "comment one line" solution and I do not have ready guidelines specially for your particular scenario. I suggest you research and understand the code of this example if you are going to base your own solution on it. The code that reads settings from the Model.XAFML file is placed in the GetConfiguratorUserSettings method. Drop me a line if you experience any further questions.
        Probably, it will be easier to implement your task from scratch by handling the CreateCustomUserModelDifferenceStore and CreateDatabaseModelDifferenceStore events of the XafApplication class. If you wish to discuss this further, it is better to create a separate ticket in the Support Center. Thanks.

        Answers approved by DevExpress Support

        created 10 years ago (modified 10 years ago)

        We have implemented the functionality described in this ticket. It will be included in our next update(s).

        Please check back and leave a comment to this response to let us know whether or not this solution addresses your concerns.

        Additional information:

        End-user UI settings (model differences) can now be stored in the application’s database (both WinForms and ASP.NET). This allows you to synch settings for users across multiple devices, share settings modified by administrators and prohibit unauthorized changes. This functionality is implemented in the system module and it is activated automatically when you enable the Security System in the Solution Wizard.

        You can allow application administrators to manage user settings across user accounts - create, copy, export and reset model differences. For this purpose, run the Model Editor and create a new Navigation Item for the ModelDifference_ListView List View.

        Online documentation:
        eXpressApp Framework > Task-Based Help > How to: Store the Application Model Differences in the Database
        How to: Enable the Administrative UI for managing Users' Model Differences
        eXpressApp Framework > Concepts > Application Model > Model Difference Storages
        Blog:  User Settings Stored in the Application Database
        Video:  Saving UI Settings in a Database

          Show previous comments (16)
          Dennis Garavsky (DevExpress) 10 years ago

            @Willem: I have updated the ticket description, thanks.
            @Carlos: Thanks for your feedback, we have registered Application Model - Make it easier to store user settings in the database for WinForms and Web applications separately to simplify this process.
            @All: Please create separate tickets in the Support Center if you have any questions or suggestions on this feature, not to mix everything within a single thread. Thanks for your understanding.

              Should this view be auto-generated if you upgrade and use the project converter on an existing project?

              Dennis Garavsky (DevExpress) 10 years ago

                @Brian: No, it should not. Please follow the eXpressApp Framework > Task-Based Help > How to: Store the Application Model Differences in the Database article to learn more on how to add it.

                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.