Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions components/grid/state.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ This article contains the following sections:
* [Information in the Grid State](#information-in-the-grid-state)
* [Examples](#examples)
* [Save and Load Grid State from Browser LocalStorage](#save-and-load-grid-state-from-browser-localstorage)
* [Save and Load Grid State in a WebAssembly application](#save-and-load-grid-state-in-a-webassembly-application)
* [Set Grid Options Through State](#set-grid-options-through-state)
* [Set Default (Initial) State](#set-default-initial-state)
* [Get and Override User Action That Changes The Grid](#get-and-override-user-action-that-changes-the-grid)
Expand Down Expand Up @@ -376,6 +377,9 @@ public class LocalStorage
}
````

### Save and Load Grid State in a WebAssembly application
The [knowledge base article for saving the Grid state in a WASM application]({%slug grid-kb-save-state-in-webassembly%}) explains two ways of storing the `Grid` state - through a custom controller and a custom service that calls the browser's LocalStorage.

### Set Grid Options Through State

The grid state allows you to control the behavior of the grid programmatically - you can, for example, set sorts, filteres, expand hierarhical rows, collapse groups.
Expand Down
19 changes: 19 additions & 0 deletions knowledge-base/grid-save-state-in-webassembly.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: How to save Grid state in a WebAssembly application?
description: How to save Grid state in a WebAssembly project?
page_title: Save Grid State in WASM
slug: grid-kb-save-state-in-webassembly
position:
tags: grid,state,wasm,webassembly,save
res_type: kb
---


## Description

How to save the Grid State in a WASM project? How to save the Grid State in a WebAssembly through a controller? How to save the Grid State in a WebAssembly from the browser's LocalStorage?


## Solution

An example is available in the following project: [https://github.com/telerik/blazor-ui/tree/master/grid/save-state-in-wasm-through-controller](https://github.com/telerik/blazor-ui/tree/master/grid/save-state-in-wasm-through-controller).