Advertisement
Guest User

Untitled

a guest
Jun 29th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.57 KB | None | 0 0
  1. $table.jqGrid({
  2. datatype: "json",
  3. url:'takepage/page=1',
  4. mtype: 'GET',
  5. ajaxSubgridOptions: { async: false },
  6. colNames:['Result','Test'],
  7. colModel:[ {name:'result',index:'result',width:120},
  8. {name:'test',index:'test', width:120}
  9. ],
  10. pager: "#"+pager,
  11. caption: "TESTjqGrid sync request to server",
  12.  
  13. jsonReader: {
  14. repeatitems: false,
  15. page: function(obj) {
  16. return obj.page;
  17. },
  18. total: function(obj) {
  19. return obj.total;
  20. },
  21. root: function (obj) {
  22. console.log(obj);
  23. return obj;
  24. },
  25. records: function (obj) {
  26. console.log(obj.rows.length);
  27. return obj.rows.length;
  28. }
  29.  
  30. }
  31.  
  32. }).jqGrid('navGrid', "#"+pager, {
  33. add: false,
  34. edit: false,
  35. del: false,
  36. search: false,
  37. refresh:false
  38. });
  39.  
  40. {"total":1,"page":1,"rows":[{"result":null,"test":"val"}],"records":1}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement