Server side processing is breaking paging
Server side processing is breaking paging
I am using .net MVC to populate datatable .But page number are not correct
''' "serverSide": true,
"ajax": //somePath",
"deferLoading": "100",
"pageLength": "25",
"pagingType": "full_numbers", '''
from server I am returning ''' data = Result, recordsTotal = gridData.Total, recordsFiltered = gridData.Results.Count()'''
On first page it is showing correctly but when I am moving to 2nd page it shows incorrect info in footer
''' "Showing 26 to 99 of 99 entries (filtered from 105 total entries)" and only 1 and 2 page are enable rest are disabled '''.
Also if I move to next page using next button it display weird info
''' "Showing 0,251 to 99 of 99 entries (filtered from 105 total entries)" '''
Please let me know where I am lacking
This question has an accepted answers - jump to answer
Answers
Can you link to a test page showing the issue as noted in the forum rules in future please?
It sounds like the recordsTotal and recordsFiltered options aren't being returned as required. If you can't link to the page, can you use the debugger so we can see the JSON data at least?
Thanks,
Allan
I have used debugger and the code is "iqafit " wil it help or you need more information please let me know
The debug trace shows that the information shown is:
Which is correct for the data returned:
Allan
Allen that page have two grid " Table (#ClaimsGrid)" and Table (#WorkQueueGrid).
Problem is with Table (#ClaimsGrid when we moves to 2nd page
I apologize for giving incomplete data . This is new debug info Debug code - "ikejav"
"recordsTotal": 105,
"recordsFiltered": 99,
Draws 4
Columns 11
Rows 25
Display start row 25
Display length 25
Oops - thanks!
You have:
and
But the documentation for both have them as integers rather than strings (
pageLength
anddeferLoading
.Make them numbers rather than strings and that should help.
Allan
It works Thanks Allan