Skip to content

Commit cf06dc1

Browse files
authored
Merge pull request #5974 from IgniteUI/skrastev/state-persistence-row-selection
Add note regarding persisting requirement for row selection.
2 parents 9112280 + c9db507 commit cf06dc1

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
@@ -115,6 +115,9 @@ _canonicalLink: grid/state-persistence
115115
> 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.
116116
}
117117

118+
>[!NOTE]
119+
> The `Row Selection` feature requires the [`primaryKey`]({environment:angularApiUrl}/classes/IgxGridComponent.html#primaryKey) property to be set, so it can be stored/restored correctly.
120+
118121
## Usage
119122

120123
[`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)