Any option to save Role specific information or user data with the persistance framework

2 posts, 0 answers
  1. Abhilash
    Abhilash avatar
    30 posts
    Member since:
    Jan 2012

    Posted 26 Apr 2013 Link to this post


    Got a question- if we have any option in which we can save user data with persistance framework so that next time if that user logs in than he can see his own saved layout,means role based options?

    If there is any please suggest.



  2. Tina Stancheva
    Tina Stancheva avatar
    3299 posts

    Posted 30 Apr 2013 Link to this post

    Hi Abhilash,

    The RadPeriststenceFramework can save the UI state of UIElements and this is why you can use it to persist the UI settings of any layout. And in case you need to associate a persisted layout with a user, you can do so using one of two approaches:
    • save the UI state of the layout in a stream and save the stream along with the user ID/Name in a database in a single record. Then you can use the UserId/Name to retrieve the stream with the persisted data of a particular user and load it in the view.
    • save the UI state of the layout in an IsolatedStorage but make sure to apply a StorageId on your view that reflects the UserId/Name. You can use data-binding and bind the StorageId property to a property that reflects the user identity. This way you will be able to save the layout in different files in an isolated storage - one file per user.

    However, please note that the RadPeriststenceFramework cannot save any databindings, it will only save the current value of a UIProperty. This is why it is usually recommended to use both approaches - the PersistenceFramework to save the UI visual state - background, foreground, font styles, even selections; and all data-related values bound to ViewModels and restore them from your business data.

    Kind regards,
    Tina Stancheva
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top