Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $table.jqGrid({
- datatype: "json",
- url:'takepage/page=1',
- mtype: 'GET',
- ajaxSubgridOptions: { async: false },
- colNames:['Result','Test'],
- colModel:[ {name:'result',index:'result',width:120},
- {name:'test',index:'test', width:120}
- ],
- pager: "#"+pager,
- caption: "TESTjqGrid sync request to server",
- jsonReader: {
- repeatitems: false,
- page: function(obj) {
- return obj.page;
- },
- total: function(obj) {
- return obj.total;
- },
- root: function (obj) {
- console.log(obj);
- return obj;
- },
- records: function (obj) {
- console.log(obj.rows.length);
- return obj.rows.length;
- }
- }
- }).jqGrid('navGrid', "#"+pager, {
- add: false,
- edit: false,
- del: false,
- search: false,
- refresh:false
- });
- {"total":1,"page":1,"rows":[{"result":null,"test":"val"}],"records":1}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement