Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
15
Layout saving and reloading of grid control in angular
posted

Hi,

User can create filters and he saves it as his preference in the application DB , next time he login ,grid will be populated with his preferred layout. Is this possible in Grid Angular version

Please help .

Parents
  • 1560
    Verified Answer
    Offline posted

    Hello,

    I have been looking into your question and my suggestion is to use the IgxGridState directive in order to save and restore the grid state. The grid state could be get using the getState method. This method returns the state in a serialized JSON string that could be saved on a database. Using the setState method you could restore grid features' state based on the IGridState object passed as an argument.

    I have created a sample application of saving and restoring of the grid state with filtering to the browser localStorage. It could be found here.

    Additionally, other features that could be included in the grid state persistence are cell selection, Advance Filtering, Paging, Sorting, and Grouping.

    More information, samples, and list with limitations about igxGrid state persistence could be found in this topic in our documentation.

    As it is mentioned there depending on the scenario, the state can be saved to the browser localStorage or sessionStorage object, or saved in a database, cloud, passed on to a service, etc.

    Let me know if I may be of any further assistance.

    Sincerely,

    Teodosia Hristodorova

    Associate Software Developer

Reply Children
No Data