Go to Scriptcase store

# Save Grid

This option allows the user to configure a layout for the consultation and summary application, and save this configuration for later use.

For example, the customer can change the layout and display of fields and change the order of the application, saving this layout. Then, when performing a filter, he can apply the saved layout so that the application is displayed in the way he configured it later.

> The definition of the data that will be stored by the option Save Grid is defined by the developer.

The Save Grid option can be used in two ways, Save Grid and Persist Status, the difference between them is the way they are saved.

Save Grid - Saves the current grid state to a profile created at the time of saving. Allowing more than one layout to be saved.

Persist Status - Saves the grid state in the session. It is not necessary to create a profile and only stores the last status.

> To activate the options, we must add the buttons on the toolbar.

## Configuration

This configuration is related to the two options, Save Grid and Persist Status, defining the data that will be stored when the option is used.

Below is the list of data that can be stored.

- Filter
- Select Columns
- Group By
- Order by
- Theme
- Language
- Row Counter
- Current page

> The filter option covers all filters in the grid application: Quicksearch, Advanced Filter, Dynamic Filter or Refined Filter.

## Save Grid State

> These settings refer only to the Save Grid option

#### Set Level

Public - Profiles saved at this level will be visible to everyone who accesses the application.

Use Rules - Creation of rules for profile creation with access restriction. [Click here][link_regra_de_uso_salvar_grid]{:target=’blank’} to see how to create a rule.

#### Layout

Defines how to display the Save Grid option

Extended - Displays the Save Grid options in a modal below the button.

Simplified - Displays the Save Grid options in a div below the toolbar.

## Save Grid state in session

#### Save in session

Activates the Persist state option, allowing the saving of the query state in the session, without the need to create a profile.

> It will be necessary to add the button Persistent State in the application toolbar.

#### Save mode

Defines whether saving the state in the session will be carried out automatically or manually. The layout of the Persistent state option changes according to the selected option.

Manual - When selected, the option Persistent State displays 3 options on the interface.

- Save State - Saves the current grid state in the session
- Load State - Load the last grid state saved in the session
- Clear - Clear the grid state saved in the session

Automatic - When selected, the option Persistent state displays only the button Clear, as the options Load State and Save State will no longer be displayed.

#### Load the last saved session when starting the application

When active, this option causes the application to start with the last state saved in the session. If there is no stored data, the query will start with the configuration defined in its development.

> This option is only available when selecting manual in the option Save way

#####

#####