Author Topic: Remote paging updates grid every other click on next page  (Read 3320 times)

stevejacobsen

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 46
    • View Profile
Remote paging updates grid every other click on next page
« on: May 27, 2016, 03:58:37 am »
When I click next page the grid updates every other click. The status bar updates and shows the correct set of records but the grid does not. In console I get:

Quote
Uncaught TypeError: Cannot read property 'call' of null (17:25:23:375 | error, javascript)  at js/paramquery-pro/pqgrid.min.js:10

On each click that does not work.

Quote
    var colM = [
        {title: "Part", width: 120, dataIndx: "Part", align: "left", cls: 'result',
            filter: {type: 'textbox', condition: 'begin', listeners: ['change']}
        },
        {title: "Description", width: 225, dataIndx: "Description", align: "left",
            filter: {type: 'textbox', condition: 'begin', listeners: ['change']}
        },
        {title: "Price", width: 75, dataIndx: "Price", align: "right", dataType: "float"},
        {title: "Orig Price", width: 75, dataIndx: "Origprice", align: "right", dataType: "float"},
        {title: "Net Price", width: 75, dataIndx: "Net", align: "right", dataType: "float"},
        {title: "Supplier", width: 75, dataIndx: "Supplier", align: "center", dataType: "integer"},
        {title: "Updated", width: 100, dataIndx: "Updated", align: "right"}
    ];

    var dataModel = {
        location: "remote",
        paging: "remote",
        dataType: "JSON",
        method: "GET",
        url: "utilities/ajax_get_catalog_data_JSON.php",
        //url: "/pro/invoice.php",//for PHP
        getData: function (dataJSON) {
            var data = dataJSON.data;
            return {curPage: dataJSON.curPage, totalRecords: dataJSON.totalRecords, data: data};
        }
    };

    var obj = $("#catalog_grid").pqGrid({
        width: 900,
        height: 400,
        dataModel: dataModel,
        colModel: colM,
        pageModel: {type: "remote", rPP: 20, strRpp: "{0}"},
        collapsible: false,
        filterModel: {on: true, mode: "AND", header: true, type: 'remote'},
        wrap: false, hwrap: false,
        virtualX: true, virtualY: true,
        title: "Catalog",
        resizable: true
    });

    var grid = $("#catalog_grid").pqGrid(obj);

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: Remote paging updates grid every other click on next page
« Reply #1 on: May 27, 2016, 03:01:53 pm »
It's working fine in the demos.

you need to troubleshoot your remote server code or share a test case.
« Last Edit: May 27, 2016, 03:21:42 pm by paramquery »