Pager Not Working...

Pager Not Working...

HillChris1234HillChris1234 Posts: 27Questions: 13Answers: 2

I have a table in my MVC that is using serverSide AJAX to get the data. Almost everything is working except the paging. On the left, it says "Showing 0 to 0 of 0 entries (filtered from 49 total entries)" no matter how many records are on display (10 by default).

Also, the pager itself is broken. The Next button doesn't work, and the pager numbers don't stop incrementing. So, if I have 49 records, I can click on page 5, which contains the end of hte record set. But then I have a page 6 that shows nothing. Then a page 7, page 8, page 9... it should stop at page 5 because that is the end. Also, the Next button doesn't work. What am I doing wrong? Am I missing something in my Json return?

return Json(new { draw = draw, recordsFilter = totalRecords, recordsTotal = totalRecords, data = data }, JsonRequestBehavior.AllowGet);

This question has an accepted answers - jump to answer

Answers

  • HillChris1234HillChris1234 Posts: 27Questions: 13Answers: 2
    Answer ✓

    AH!!! I need to use recordsFiltered, not recordsFilter.

  • allanallan Posts: 63,791Questions: 1Answers: 10,513 Site admin

    Thanks for posting back. Good to hear you've got it working now.

    Allan

This discussion has been closed.