jQWidgets Forums
jQuery UI Widgets › Forums › Grid › jqxgrid grid width changes when page references jqxgrid.storage.js
Tagged: autoloadstate, autosavestate, grid width, jqxgrid
This topic contains 6 replies, has 2 voices, and was last updated by ziggy 11 years, 7 months ago.
-
Author
-
October 30, 2013 at 3:43 am jqxgrid grid width changes when page references jqxgrid.storage.js #31575
Hi!
I’ve been working on the widgets lately (especially the jqxgrid) and I am stuck with this problem. Whenever I reference the jqxgrid.storage.js for the autoloadstate and autosavestate properties of the grid, its width won’t take the size I set for it. What do I need to override the width size of the grid?
Thanks in advance!
October 30, 2013 at 6:11 am jqxgrid grid width changes when page references jqxgrid.storage.js #31580Hi Karen,
Do you call “savestate” when you change the width?
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comOctober 30, 2013 at 6:28 am jqxgrid grid width changes when page references jqxgrid.storage.js #31581Hi Peter,
I set the following properties for my jqxgrid :
$(“#jqxgrid”).jqxGrid(
{
width: 550,
source: dataAdapter,
theme: theme,
pageable: true,
autoheight: true,
sortable: true,
altrows: true,
filterable: true,
showfilterrow: true,
showstatusbar: true,
autoloadstate: true,
autosavestate: true,….etc.
Is that what you meant?
**Karen
October 30, 2013 at 6:33 am jqxgrid grid width changes when page references jqxgrid.storage.js #31583Hi Karen,
I assume that you change the Grid’s width or at least that is what I understood from “its width won’t take the size I set for it”. My question is: do you call the savestate() method after setting the Grid’s “width” property to a new value? If you do not, then I suggest you to try it out.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comOctober 30, 2013 at 6:47 am jqxgrid grid width changes when page references jqxgrid.storage.js #31584Hi Peter,
Yes, I explicitly set the grid’s width on every reload and I tried adding the ff. lines as suggested :
var state = $(“#jqxgrid”).jqxGrid(‘savestate’);
….
$(“#jqxgrid”).jqxGrid(‘loadstate’, state);but it still wont take the width I set it for. I also get this bug :
Uncaught TypeError: Cannot read property ‘length’ of undefined jquery-1.10.2.js:631
**Karen
October 30, 2013 at 7:05 am jqxgrid grid width changes when page references jqxgrid.storage.js #31585Hi Karen,
I think that this discussion will be better if you send us a complete sample which demonstrates your scenario so we can try it locally. In addition, I hope that you use the latest -ver 3.0.3 of jQWidgets.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comOctober 30, 2013 at 7:13 am jqxgrid grid width changes when page references jqxgrid.storage.js #31591Hi Peter,
I guess I found the culprit
I am using inlineframe for loading the pages and I am using the id #’jqxgrid’ for all my grid.
Giving different ID name for each my of my grids solved the problem!
Thanks Peter!
**Karen
-
AuthorPosts
You must be logged in to reply to this topic.