JqGrid gives the wrong result for the number of records, the number of pages and rowNum when using the filter toolbar

In my application, I use JQGrid to display data in a Grid.

In this case, my grid is set to loadonce:true , and also provides the ability to install a toolbar.

My problem is that I am wrong in counting the total number of pages, the total number of records and the rowNum grid when I used the filter toolbar.

For example: My grid has a total of 14 entries and rowNum = 5. Thus, the figure below displays 3 pages, as shown in the figure below.

enter image description here

Now the code below works fine for me in the normal case (the case when I did not use the filter toolbar).

 var records = $('#list10').getGridParam('records'); var rowNum = $('#list10').getGridParam('rowNum'); var pageCount = Math.ceil( parseInt(records) / parseInt(rowNum)); 

But when I used filters, the code written above does not give me an updated result. Consider the image below, for example .. enter image description here

Here for this case, the above code gives me the same result as ... total pages = 3, total number of rows = 14 and rowNum = 5.

Can anyone suggest me how can I get the updated value of the page, total, records, rowNum when I used the filter toolbar ??

+4
source share

All Articles