jQWidgets Forums

jQuery UI Widgets Forums Grid Grid save state issue

This topic contains 4 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 2 months ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Grid save state issue #66831

    DavidSimmons
    Participant

    I have been using grid save and load state since it was made available. Recently I have notice that this save or load state for grid is no longer working correctly. I am on the newest version of JQWidgets but not sure if this is due to the newest release are some released before since users don’t always report problems to me in a timely manner.

    I have some tools included in a status bar for the ability to save and/or load state and have not changed this over the past year.
    So making some simple examples similar to your example on the website what I am noticing is that load state is not working correctly and never completes. This occurs while working on the same page testing state, or returning to a page and trying to load state that has been saved. So I can’t tell if the state is never saved correctly for the load is not working correctly.

    Is there way to test save state. Does the save state worked using cookies?

    Grid save state issue #66834

    DavidSimmons
    Participant

    I found one of my issues. I use a blank column name at the end of my grids which seem to cause my issue.
    datafields: [
    { name: ‘ID’, type: ‘int’},
    { name: ‘Content’, type: ‘text’},
    { name: ‘Created’, type: ‘text’},
    { name: ‘CreatedBy’, type: ‘text’},
    { name: ‘Updated’, type: ‘text’},
    { name: ‘UpdatedBy’, type: ‘text’},
    { name: ”}
    ],
    After correcting this, I still have an issue if I show a filter bar by default….

    Grid save state issue #66841

    Peter Stoev
    Keymaster

    There is “getstate” method which you can use for getting the widget’s state.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

    Grid save state issue #66925

    DavidSimmons
    Participant

    Using your example. This never works for me…..
    var gridstate = $(jqxgrid).jqxGrid(‘getstate’);
    if (gridstate) {
    $(jqxgrid).jqxGrid(‘loadstate’, gridstate);
    } else {
    $(jqxgrid).jqxGrid(‘loadstate’);
    }

    This works unless you sort columns before you save.. There is a bug in the save grid state, no way around it..
    $(jqxgrid).jqxGrid(‘loadstate’);

    Grid save state issue #66964

    Peter Stoev
    Keymaster

    Hi David,

    We cannot reproduce a bug with “savestate” or “loadstate”. It works when the Grid is filtered and sorted and that is obvious from our online sample, too – http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/saveloadstate.htm?arctic

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com/

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

You must be logged in to reply to this topic.