jQWidgets Forums
jQuery UI Widgets › Forums › Grid › jqxGrid State Maintenance Conflick
Tagged: grid, javascript grid, jquery grid
This topic contains 3 replies, has 3 voices, and was last updated by Peter Stoev 9 years, 4 months ago.
-
Author
-
All the “ready functions working fine until I set autoloadstate and autosavestate properties to auto. Is there any way around?
ready: function () { FormatGrid(); $(window).resize(function () { FormatGrid(); }) var state = null; $("#loadState").click(function () { // load the Grid's state. if (state) { $("#jqxgrid").jqxGrid('loadstate', state); } else { $("#jqxgrid").jqxGrid('loadstate'); } }); },
function FormatGrid() { var browserInfo = new $.jqx.response(); var viewport = browserInfo.viewPort; var vpHeight = viewport.height; var vpWidth = viewport.width; if (vpWidth < 766) { $("#jqxgrid-cbf").jqxGrid('hidecolumn', 'countryCode'); $("#jqxgrid-cbf").jqxGrid('setcolumnproperty', 'countryName', 'width', 'auto'); } else { $("#jqxgrid-cbf").jqxGrid('showcolumn', 'countryCode'); $("#jqxgrid-cbf").jqxGrid('setcolumnproperty', 'countryName', 'width', 'auto'); } var pageheaderHeight = $(".page-header").outerHeight(true) + 80; var gridHight = vpHeight - pageheaderHeight; $('#jqxgrid-cbf').jqxGrid({ height: gridHight }); }
Hi Wherever66,
“auto” is not valid property value. the valid property value is true. What’s the issue with the “ready” callback? It’s called when the Grid is ready and that does not depend on these properties.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comSorry, my typo, I meant true. When I have those statements in the ready property grid state is not working at all. Please give me a direction…
Hi Wherever66,
Fine, but we cannot see a problem here. Could you share a jsfiddle or jqwidgets.com/jseditor example.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.