jQWidgets Forums

jQuery UI Widgets Forums Grid unwanted server side call when changing the pagesize

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 9 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • Kalvin
    Participant

    Hi,

    I am using server side paging in the grid. Based on the user’s selection on the profile, I call $("#my-jqxgrid").jqxGrid("updatebounddata"). The selected profile name is sent to the server as the result of the updatebounddata call. The server replies data of the first page in JSON. Along with it, a list of new columns, a new page size and a list of new page size options are returned, and they are saved in global variables on the client side with the beforeprocessing callback function for the source object. Later in the event handler for the bindingcomplete event of the grid, they are used to update the grid as follow:

            $("#my-jqxgrid").on("bindingcomplete", function(event) {
                if (isProfileChanged) {
                    $("#my-jqxgrid").jqxGrid(
                        {  columns:         newColumns
                         , pagesize:        newPageSize
                         , pagesizeoptions: newPagesizeoptions
                        } 
                    );
                }
             });
    

    The problem is that when pagesize or pagesizeoptions is updated this way, it triggers the grid to make an additional server side call. If only the columns are updated $("#my-jqxgrid").jqxGrid( { columns: newColumns } ), no additional server side call. Is there a way to skip the server side call when pagesize and pagesizeoptions are also updated? Or, is there other way to update the pagesize and pagesizeoptions of the grid?

    Thanks


    Peter Stoev
    Keymaster

    Hi Kalvin,

    Whenever any of these properties is set the Grid will make updatebounddata call internally, if the Grid is used in virtualmode.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.