Author Topic: How to use grid paging processing?  (Read 2402 times)

Sodam

  • Newbie
  • *
  • Posts: 5
    • View Profile
How to use grid paging processing?
« on: January 25, 2018, 01:31:28 pm »
Hello?
I used it like this ->
--------------jsp--------------------------------------------
<div id="grid_md" style="margin:5px auto;"></div>
--------------------------------------------------------------
--------------script-----------------------------------------
var obj = { width: 900
            , height: 578
            , editable:false
            , resizable:true
            , draggable:false
            , wrap:false
            , hwrap:false
            , showTop:false
            , numberCell: { show: false }
              , virtualX: true
              , virtualY: true
              , pageModel: { type: "remote", rPP:30,  strRpp:"{0}", totalRecords:100, strDisplay: "{0} to {1} 검색결과  {2}건" }
            , detailModel: {
                  cache: true,
                  collapseIcon: "ui-icon-plus",
                  expandIcon: "ui-icon-minus",
                  init: initDetail}
            };

url : "${contextPath}/crm/aaa.ajax",
var page = data.page;
               var list = data.list;
               var totalRec = page.listCount;

$("#grid_md").pqGrid("option","dataModel",{curPage:1,  totalRecords: totalRec, data: list});
$("#grid_md").pqGrid("option","dataModel",{data:data.list});
$("#grid_md").pqGrid( "refresh" );
$("#grid_md").pqGrid( "refreshDataAndView" );

so.. It($("#grid_md")) becomes inactive.
Please reply to this question. thank you.

paramvir

  • Administrator
  • Hero Member
  • *****
  • Posts: 6310
    • View Profile
Re: How to use grid paging processing?
« Reply #1 on: January 25, 2018, 04:15:13 pm »
Your script is incorrect ( sorry but it doesn't seem to make any sense ) and seems to have syntax errors.

Please follow this example on remote paging. https://paramquery.com/demos/paging