# IRPCFolderUISettings.ResetFolderUIStateToDefaults

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Vault API](https://developer.m-files.com/APIs/gRPC-API/vault/index.md) > [Folder UI settings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/ResetFolderUIStateToDefaults/

Badges: `Vault API / standard` `write` `session` `idempotent` `returns metadata structure version`

Resets the caller's display settings of a folder to the program defaults or to the common
settings, and returns the resulting state as a structure.

- **Service:** [Folder UI settings](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/index.md) `MFiles.IRPCFolderUISettings`
- **gRPC method:** `/MFiles.IRPCFolderUISettings/ResetFolderUIStateToDefaults`
- **HTTP (mf-http-grpc):** `POST /grpc/v1/reset-folder-uistate-to-defaults`
- **Request:** [`ResetFolderUIStateToDefaultsRequest`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/ResetFolderUIStateToDefaults/index.md#request)
- **Response:** [`ResetFolderUIStateToDefaultsResponse`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/ResetFolderUIStateToDefaults/index.md#response)
- **Book and level:** Vault API, standard
- **Kind:** write
- **Session:** Required: the session ID from LogIn in the mfiles-session-id-bin metadata.
- **Idempotent:** yes
- **Returns metadata structure version:** yes (in the mfiles-metadata-version-bin trailer)
- **Streaming:** none (unary)

<a id="remarks"></a>

## Remarks

- Requires a vault session. No special vault rights are needed.
- Behaves like
  [ResetFolderUISettingsToDefaults](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/ResetFolderUISettingsToDefaults/index.md)
  but returns a [FolderUIState](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderUIState/index.md), so the caller can refresh its
  listing without another call.
- Exactly one of `reset_to_program_defaults` and `reset_to_common_defaults` must be true;
  otherwise the call fails with "The parameter is incorrect." and nothing changes.
- The folder is given directly as a [UISettingsFolderID](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UISettingsFolderID/index.md), for
  example the `folder_id` from [GetFolderUIState](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/GetFolderUIState/index.md).
- Fails with "Not implemented." on servers where the feature is not enabled.

<a id="request"></a>

## Request: ResetFolderUIStateToDefaultsRequest

The request of ResetFolderUIStateToDefaults. Exactly one of `reset_to_program_defaults` and
`reset_to_common_defaults` must be true.

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `reset_to_program_defaults` | `bool` | True to reset to the program defaults. |
| `reset_to_common_defaults` | `bool` | True to reset to the common settings. |
| `uisfid` | [`UISettingsFolderID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UISettingsFolderID/index.md) | The folder. |
| `uisfid.type` | [`UISettingsFolderType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.UISettingsFolderType/index.md) | The type that describes the folder whose UI settings are being retrieved. |
| `uisfid.view` | `int32` | If not zero, specifies the view where the folder is located. |
| `max_data_version_interpretable` | `int32` | The newest settings data version that the caller understands. Use 15. |

<a id="response"></a>

## Response: ResetFolderUIStateToDefaultsResponse

The response of ResetFolderUIStateToDefaults: the resulting state, in the same form as the
response of GetFolderUIState.

> Nested message fields are expanded to depth 3; follow a type link for deeper levels and for the type's own page.

| Field | Type | Description |
|---|---|---|
| `folder_uistate` | [`FolderUIState`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderUIState/index.md) | The caller's display settings after the reset. |
| `folder_uistate.folder_id` | [`UISettingsFolderID`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.UISettingsFolderID/index.md) | The ID that describes the folder. |
| `folder_uistate.folder_id.type` | [`UISettingsFolderType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.UISettingsFolderType/index.md) | The type that describes the folder whose UI settings are being retrieved. |
| `folder_uistate.folder_id.view` | `int32` | If not zero, specifies the view where the folder is located. |
| `folder_uistate.folder_type` | [`ShellFolderType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.ShellFolderType/index.md) | Specifies shell folder type. Values: `SHELL_FOLDER_TYPE_NORMAL` (0), `SHELL_FOLDER_TYPE_OBJECT_HISTORY` (2), `SHELL_FOLDER_TYPE_NON_OBJECT_ITEMS` (3), `SHELL_FOLDER_TYPE_RELATIONSHIPS` (4), `SHELL_FOLDER_TYPE_SUBOBJECTS` (5), `SHELL_FOLDER_TYPE_COLLECTION_MEMBERS` (6), `SHELL_FOLDER_TYPE_DELETED_CONFLICT_HISTORY` (7). |
| `folder_uistate.show_right_pane` | `bool` | Specifies whether the right pane is displayed. |
| `folder_uistate.show_bottom_pane` | `bool` | Specifies whether the bottom pane is displayed. |
| `folder_uistate.is_bottom_pane_minimized` | `bool` | Specifies whether the bottom pane is minimized. |
| `folder_uistate.is_right_pane_minimized` | `bool` | Specifies whether the right pane is minimized. |
| `folder_uistate.show_metadata_editorn_right_pane` | `bool` | Specifies whether the metadata editor is displayed in the right pane. If false, the metadata editor appears in the bottom pane. |
| `folder_uistate.is_hit_highlighting_enabled` | `bool` | Specifies whether hit highlighting in file content is enabled. |
| `folder_uistate.bottom_pane_height` | `int32` | Specifies the bottom pane height. The height is relative to the size of the frame window holding the bottom pane bar. |
| `folder_uistate.right_pane_width` | `int32` | Specifies the right pane width. |
| `folder_uistate.show_task_pane` | `bool` | Specifies whether the task area is displayed. |
| `folder_uistate.is_task_pane_minimized` | `bool` | Specifies whether the task area is minimized. |
| `folder_uistate.listing_ui_state` | [`FolderListingUIState`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderListingUIState/index.md) | The listing UI state. |
| `folder_uistate.listing_ui_state.columns[]` | repeated [`FolderListingColumn`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderListingColumn/index.md) | The Columns. |
| `folder_uistate.listing_ui_state.column_sorting[]` | repeated [`FolderListingColumnSorting`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FolderListingColumnSorting/index.md) | The ColumnSortings. |
| `folder_uistate.listing_ui_state.view_mode` | [`FolderListingViewMode`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.FolderListingViewMode/index.md) | The listing view mode. Values: `FOLDER_LISTING_VIEW_MODE_UNINITIALIZED` (0), `FOLDER_LISTING_VIEW_MODE_ICON` (1), `FOLDER_LISTING_VIEW_MODE_SMALL_ICON` (2), `FOLDER_LISTING_VIEW_MODE_LIST` (3), `FOLDER_LISTING_VIEW_MODE_DETAILS` (4), `FOLDER_LISTING_VIEW_MODE_THUMBNAIL` (5), `FOLDER_LISTING_VIEW_MODE_TILE` (6), `FOLDER_LISTING_VIEW_MODE_THUMBSTRIP` (7), `FOLDER_LISTING_VIEW_MODE_CONTENT` (8). |
| `folder_uistate.listing_ui_state.item_grouping_mode` | [`FOLDERLISTINGITEMGROUPINGMODEFLAGS`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.FOLDERLISTINGITEMGROUPINGMODEFLAGS/index.md) | The listing item grouping mode. |
| `folder_uistate.listing_ui_state.icon_size` | `int32` | The listing item icon size. |
| `folder_uistate.listing_ui_state.results_per_page` | `uint32` | The results per page option. |

<a id="related"></a>

## Related methods

- [ResetFolderUISettingsToDefaults](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/ResetFolderUISettingsToDefaults/index.md): Resets the caller's display settings of a folder to the program defaults or to the common settings, and returns the result as an opaque blob.
- [GetFolderUIState](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCFolderUISettings/GetFolderUIState/index.md): Gets the display settings of a folder location as a structure.
