Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
180
Maintaining State of igGrid
posted

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 

Thanks,

Anilesh

Parents
No Data
Reply
  • 145
    Suggested Answer
    posted

    You can definitely do so, using the grid API, along with some HTML5 feature such as Local Storage. You can also use cookies, but i suggest local storage, if your supported browsers support it. 

    You can have a look at the following API docs in order to see how you can retrieve various settings, such as the current page index, filtering expressions, etc. You can obtain the filtering expressions in the following way:

    $("#grid1").data("igGrid").dataSource.settings.filtering.expressions

    http://help.infragistics.com/jQuery/2012.1/

    We are planning to have a full blown persistence framework, as part of the next releases. 

    Hope it helps. 

    Angel

Children