Hi,
Can I maintain the state of igGrid. Suppose the user is on Page 2 in grid and with filter set on one column.
Next time user visited the same page and I bind data and set page number 2 and filter row open and fill the filer column textbox with the same old value
You can use cookies to persist features states.
For example you can get igGridPaging pageSize/pageIndex properties on igGridPaging.pageIndexChanged and igGridPaging.pageSizeChanged events and then create/update cookie.
When the user returns to the same page get the cookie value and use it to restore the paging state.
For filtering you can get the current filter on igGridFiltering.dataFiltered event with this code:
var filteringExpressions = $("#grid1").data("igGrid").dataSource.settings.filtering.expressions;
and then create/update cookie.
When the user returns to the same page get the cookie value and restore the filtering state by using the igGridFiltering.filter method.
Hope this helps,
Martin Pavlov
Infragistics, Inc.
I tried above solution for maintaining state of the grid. I need to maintain filter, sort, page index and page size in the grid.
It works very well for filter ans sort settings.
However, if I try to maintain page size along with page index, page size resets page-index to 0.
Without page size maintenance, page index state gets maintained.
Is there any way to maintain page size along with current page index?