Тип данных: 'jsonstring' игнорирует totalpages и totalrecord в jqgird версии 5.2.1
I have recently upgraded my jqgrid from version 3 to 5.2.1, While doing so i faced unique problem while returning data from server side. what i want, i am sending only 80 record from server side,with total records of 280, page=1 ad totalpage=4, but my jqgrid always show page 1 of 1 and displaying View 1 - 80 of 80 records, and rownum is 80. it should display 1-80 from 280 and page 1 of 4. Seems like my jqgrid ignoring the totalpages and totalrrecords. Here is my jqgrid code:
jQuery("#tradeList").jqGrid( { jsonReader : { id : "0" }, url : 'getDetailAgingReportInternal.go', datatype : 'jsonstring', mtype : 'POST', datastr : '{"page":' + data.page + ',"total":' + data.totalPages + ',"records":' + data.total + ',"rows": ' + data.rowData + '}', colModel : data.colModel, pager : '#pagerTrade', rowNum : data.records, rowList : [ 80, 160, 240 ], viewrecords : true, height: "350", width : "auto", viewsortcols : [ true, 'vertical', true ], multiselect : data.multiselect, multiboxonly: true, onPaging : function(pgButton) { var pageNo = getPageNo("tradeList"); var rowCount = getRowCount("tradeList"); loadDetailAgingReport(1, postData.bucketType, postData.mode, postData.modeType, '', '', postData.entity, '', postData.entityId, postData.statusTypeId, postData.tradeTypeIdJson, postData.isOTC, pageNo, rowCount, '', false, false); return 'stop'; }, onSortCol : function(index, columnIndex, sortOrder) { //alert("index:"+index+", columnIndex:" +columnIndex + ", sortOrder:" +sortOrder); var colSort = {}; colSort.index = getColumnIndex("tradeList", columnIndex); colSort.direction = sortOrder; var colSortList = [ colSort ]; var pageNo = getPageNo("tradeList"); var rowCount = getRowCount("tradeList"); loadDetailAgingReport(1, postData.bucketType, postData.mode, postData.modeType, postData.colHeader, postData.statusType, postData.entity, postData.colName, postData.entityId, postData.statusTypeId, postData.tradeTypeIdJson, postData.isOTC, pageNo, rowCount, colSortList, false, false); return 'stop'; }, gridComplete:function(){ } });
Что я уже пробовал:
Я перепробовал все возможные решения на любом сайте, так как не хочу сильно менять свой код, ожидая решения с минимальными изменениями.