jQWidgets Forums

jQuery UI Widgets Forums Grid Save the filter

Tagged: 

This topic contains 5 replies, has 2 voices, and was last updated by  Hristo 5 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • Save the filter #107287

    Pietervk
    Participant

    When the user creates some complex filter on the UI to select data, they can operate on a selected row via a menu item on the site.
    After performing that operation, I return the user to the page with the grid. I would like to initiate the grid with the same filter.

    As in my case, the data is filtered on the server, I thought about saving the jsonData in a cookie. That works, but it does not reflect the filter in the UI.

    Can you give me some guidance how I can initiate the grid with an existing filter? I could save and access the jsonData on the page, but then needs to feed it to the grid.

    Save the filter #107299

    Hristo
    Participant

    Hello Pietervk,

    I tested this example and it seems to work fine:
    https://stackblitz.com/github/jqwidgets/angular/tree/master/grid/statemaintenance/

    Did you receive any error message in the console when trying to load this jsonData” object?
    Please, check it again is there some changes on that object when loading it in the jqxGrid.

    As a workaround, you could use the filtering methods to prepare jqxGrid to have filters as they are were before that.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    Save the filter #107315

    Pietervk
    Participant

    Hi Hristo,
    thanks for that. I am using virtual mode. Does autoloadstate/autosavestate work with virtual mode? I tried it in my solution, but the state is not saved after sorting or filtering.

    Pieter

    Save the filter #107340

    Hristo
    Participant

    Hello Pieter,

    It should work.
    Is there any error message?
    I tested this example and it seems to work fine:
    https://stackblitz.com/edit/github-kz6bke
    I would like to ask you if it possible for you to provide us with an example that demonstrates this.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    Save the filter #107341

    Pietervk
    Participant

    Hi Hristo,
    I am using the jQuery version, could that be different?

    Before creating the example, can you confirm that autosavestate should create an entry in Local Storage after changing the sort or filter?

    Save the filter #107366

    Hristo
    Participant

    Hello Pietervk,

    It should work we do not have reported an issue about this.
    About the second question – yes, it saves the state in the window.localStorage object.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.