Pagination is not working when using serverSide : true

Pagination is not working when using serverSide : true

Priyanka_mallickPriyanka_mallick Posts: 6Questions: 3Answers: 0

Hi,

Thanks for your time. I'm using Datatables in our project. There r about 10,000 records which need to be bind to Datatables. With this, I'm facing performance issue. So I'm trying to use Server-side Processing. But whenever I use below code. Pagination is not working. All the 10,000 records are appearing on one page. Below is the code:

    $("#example").DataTable({
        "columnDefs": [
                           {
                               "orderable": false, "targets": 8 
                           }
        ],
        "aaSorting": [],
        "processing": true,
        "serverSide": true,
        "ajax": "../Scripts/Application/testData.txt"
    });

in the testData.txt file, only "data" is there. Do I need to add any reference for serverSide Processing?

Thanks in Advance

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,356Questions: 1Answers: 10,444 Site admin
    Answer ✓

    You can't use a text file for server-side processing since a text file doesn't do any server-side processing!

    If you want to use server-side processing you have to have a script on the server that actually implements server-side processing.

    One thing you could try is the deferRender option will which speed things up without server-side processing.

    Allan

  • Priyanka_mallickPriyanka_mallick Posts: 6Questions: 3Answers: 0

    Thank you so much for your Help, Allan :)

This discussion has been closed.