jQWidgets Forums
jQuery UI Widgets › Forums › Grid › autoloadstate issue with jqWidgets 3.0
This topic contains 6 replies, has 4 voices, and was last updated by juanbill 11 years, 2 months ago.
-
Author
-
Hello!
I just updated to jqWidgets 3.0.0. There seems to be an issue with autoloadstate set to true. In a grid with server-side filtering, sorting and paging enabled I get a “Uncaught RangeError: Maximum call stack size exceeded” exception when the grid is trying to autoload the state.
Hi gediminas,
I do not think that “autoloadstate” should be used when you do Server Paging, Sorting and Filtering as the state in this case will be loaded on each data refresh which in that case will happen very frequently.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comSo if I need the state to be autoloaded only when the page was loaded, which callback should I use?
You can use the loadstate method and call it in the Grid’s ready callback.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi guys,
When I set autoloadstate and autosavestate to true then it also keeps the height of the table. I don’t want the height state to be saved and I have to use a autoheight=false.
Cheers,
CirrusHi Peter,
Great product.
I am also following this question.
Is it possible to exclude the height variable when autosavestate and autoloadstate is set to true.
My init code is below.Sometimes the user can resize the window, and I would like the height to be re-adjusted to
height: $(window).height()-40,
not retain the saved height. (I have a toolbar with a height of 40 pixels so the idea of using percentage is avoided).
Thanks heaps,
juaninit code ….
$(“#jqxgrid”).jqxGrid(
{
width: ‘100%’,
height: $(window).height()-40,
source: dataAdapter,
sortable: true,
autoheight: false,
autoloadstate: false,
autosavestate: false,
columnsresize: true,
columnsreorder: true,
showfilterrow: true,
filterable: true,
altrows: true,
groupsexpandedbydefault: true,
groupable: true,
showgroupsheader: false,
selectionmode: ‘multiplerowsextended’,
groupsrenderer: groupsrenderer,
theme: ‘metro’,i managed to get to work with the following.
I tried inserting
$(‘#jqxgrid’).jqxGrid({ height: $(window).height()-40 });
in
$(“#jqxgrid”).bind(‘bindingcomplete’, function(){
$(‘#jqxgrid’).jqxGrid({ height: $(window).height()-40 });
});as well as
<script type=”text/javascript”>
//located near bottom of page
$(window).on(“load”, function(){
$(‘#jqxgrid’).jqxGrid({ height: $(window).height()-40 });
});
</script> -
AuthorPosts
You must be logged in to reply to this topic.