What to do if datatables searching ,sorting and pagination is not working

What to do if datatables searching ,sorting and pagination is not working

NeelamNeelam Posts: 3Questions: 1Answers: 0

I am using datatables library and my searching,sorting and pagination is working if i have entered dummy data in my tables but as i integerate data through api's it does not work
what is the solution????

Answers

  • colincolin Posts: 15,176Questions: 1Answers: 2,589

    Hi @Neelam ,

    We're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.

    Cheers,

    Colin

  • NeelamNeelam Posts: 3Questions: 1Answers: 0

    Here is the screenshot as pagination is still showing 1 of 1 enteries even after having enteries

  • NeelamNeelam Posts: 3Questions: 1Answers: 0

    Also if i am selecting 10 enteries to show it is showing all enteries in one page.
    Below is the screenshot

  • colincolin Posts: 15,176Questions: 1Answers: 2,589

    As I said, we're happy to take a look, but it would help, as per the forum rules, if you could link to a running test case showing the issue so we can offer some help. It's not easy to offer a code-level solution without seeing any code - just screenshots.

    That said, I suspect you're using server-side processing, and that your return data isn't correct. Look at the Ajax tab in this example here, and ensure your responses match the expected format, especially these header values:

      "draw": 1,
      "recordsTotal": 57,
      "recordsFiltered": 57,
    

    Cheers,

    Colin

This discussion has been closed.