jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Grid save state issue
Tagged: grid load state, grid save state
This topic contains 4 replies, has 2 voices, and was last updated by Peter Stoev 10 years, 2 months ago.
-
AuthorGrid save state issue Posts
-
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?
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….There is “getstate” method which you can use for getting the widget’s state.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com/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’);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 StoevjQWidgets Team
http://www.jqwidgets.com/ -
AuthorPosts
You must be logged in to reply to this topic.