I have a grid with grouping. If you collapse a group and then refresh the grid, all groups return to their default expanded state.
I'm wondering if there is a way to keep track of which groups are collapsed, so that upon refreshing the grid those specific rows can be collapsed again.
My initial attempt at this was to select all collapsed rows with jQuery, and then pass that list of jQuery objects into the grid's collapseRow function, like this:
var rows = $('td[aria-expanded=false]').parents('tr.k-grouping-row');
grid.collapseRow(rows);
That works in that I can expand/collapse only those rows that were collapsed when the rows variable was created, however after refreshing the grid those jQuery objects no longer exist on the page so passing "rows" into the collapseRow function has no effect.
I know that you can save various states about the grid, such as grouping, sorting and column ordering, but is there currently any way to accomplish this?
I'm wondering if there is a way to keep track of which groups are collapsed, so that upon refreshing the grid those specific rows can be collapsed again.
My initial attempt at this was to select all collapsed rows with jQuery, and then pass that list of jQuery objects into the grid's collapseRow function, like this:
var rows = $('td[aria-expanded=false]').parents('tr.k-grouping-row');
grid.collapseRow(rows);
That works in that I can expand/collapse only those rows that were collapsed when the rows variable was created, however after refreshing the grid those jQuery objects no longer exist on the page so passing "rows" into the collapseRow function has no effect.
I know that you can save various states about the grid, such as grouping, sorting and column ordering, but is there currently any way to accomplish this?