ServerSide Paging Not Working

ServerSide Paging Not Working

ufukozerufukozer Posts: 2Questions: 1Answers: 0

Hello.

I'm using datatables 1.10.16 and django-datatables-view (https://bitbucket.org/pigletto/django-datatables-view) for server side.

My server return:

My datatables option:

var tablo = $('#myTable').dataTable({
destroy: true,
"ajax": {
"processing": true,
"serverSide": true,
"url": {% url 'deneme' %},
"contentType": 'application/json; charset=utf-8',
"processData": true,
"dataType": "json"
},
"paging": true,
"ordering": true,
"order": [[ 0, 'desc' ]],
"info": true,
"select": true,
"scrollY": "30vh",
"scrollCollapse": true,
"scrollX": true,
"pagingType": "input"
});

recordsTotal:22 at my json.

But I can see only one page. Second page not see.

I cannot other pages. What can I do?

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,303Questions: 26Answers: 4,947
    Answer ✓

    One problem is the following are inside the -option ajax` option:

    "processing": true,
    "serverSide": true,
    

    They should be outside along with your other config options like "paging": true,. With your current config serverSide is not being enabled.

    Kevin

  • ufukozerufukozer Posts: 2Questions: 1Answers: 0

    Thank you very much.

This discussion has been closed.