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.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • autoloadstate issue with jqWidgets 3.0 #27123

    gediminas
    Member

    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.

    autoloadstate issue with jqWidgets 3.0 #27124

    Peter Stoev
    Keymaster

    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 Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    autoloadstate issue with jqWidgets 3.0 #27125

    gediminas
    Member

    So if I need the state to be autoloaded only when the page was loaded, which callback should I use?

    autoloadstate issue with jqWidgets 3.0 #27126

    Peter Stoev
    Keymaster

    You can use the loadstate method and call it in the Grid’s ready callback.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    cirrus
    Participant

    Hi 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,
    Cirrus


    juanbill
    Participant

    Hi 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,
    juan

    init 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’,


    juanbill
    Participant

    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>

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

You must be logged in to reply to this topic.