Skip to content

Commit c9db507

Browse files
committed
Add note regarding persisting requirement for row selection.
1 parent 5df579f commit c9db507

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

en/components/grids_templates/state-persistence.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,9 @@ _canonicalLink: grid/state-persistence
9494
> The [`IgxGridState`]({environment:angularApiUrl}/classes/igxgridstatedirective.html) directive does not take care of templates. Go to [Restoring Column](state-persistence.md#restoring-columns) section to see how to restore column templates.
9595
}
9696

97+
>[!NOTE]
98+
> The `Row Selection` feature requires the [`primaryKey`]({environment:angularApiUrl}/classes/IgxGridComponent.html#primaryKey) property to be set, so it can be stored/restored correctly.
99+
97100
## Usage
98101

99102
[`getState`]({environment:angularApiUrl}/classes/igxgridstatedirective.html#getState) - This method returns the grid state in a serialized JSON string, so developers can just take it and save it on any data storage (database, cloud, browser localStorage, etc). The method accepts first optional parameter `serialize`, which determines whether [`getState`]({environment:angularApiUrl}/classes/igxgridstatedirective.html#getState) will return an [`IGridState`]({environment:angularApiUrl}/interfaces/igridstate.html) object or a serialized JSON string.

0 commit comments

Comments
 (0)