This is a migrated thread and some comments may be shown as answers.

Is there a grid options state change event?

1 Answer 465 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Doug
Top achievements
Rank 1
Doug asked on 09 May 2018, 03:12 PM
I want to persist grid state whenever a column width, order, or visibility state is changed such that when a user visits the same page in the future the columns are in the same state.  I don't want to require an extra button click after the user makes a change to column state.

1 Answer, 1 is accepted

Sort by
0
Accepted
Viktor Tachev
Telerik team
answered on 11 May 2018, 12:29 PM
Hi Doug,

Different action performed by the user will raise different event for the Grid. For example changing the width of a column would raise columnResize and hiding a column will trigger columnHide. You can see a full list of the Grid events in the Events section of the docs.

With that said, as I understand the requirement is that Grid settings should be persisted when they leave the page. In that case I would suggest using the onbeforeunload event. This way the last applied options will be saved at once.

In order to restore the settings you can use a button or the document.ready event.

Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Grid
Asked by
Doug
Top achievements
Rank 1
Answers by
Viktor Tachev
Telerik team
Share this question
or