Author Topic: Hide Pager when no data is returned [Correction]  (Read 2561 times)

eroque

  • Pro Enterprise
  • Newbie
  • *
  • Posts: 4
    • View Profile
Hide Pager when no data is returned [Correction]
« on: March 04, 2014, 12:29:56 am »
I would like to hide the pager if no data is returned. I think the Grid should do this by default.  Setting showBottom to false does the work.
« Last Edit: March 04, 2014, 12:39:12 am by eroque »

roundy72

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Hide Pager when no data is returned [Correction]
« Reply #1 on: September 03, 2014, 08:06:50 pm »
here's what I did, may it help you or someone in the future:

        var dataM = {
            data: tmpJSON,
            location: "local",
            sorting: "local",
            paging: (tmpJSON.length <= 10 ? null : "local"),  //hide paging if 10 or less results
            dataType: "JSON"
        };

        var grid1 = $("div#gridContainer").pqGrid({
            dataModel: dataM  ...