I'm having a problem with my code in Datatables server-side processing. The problem is with the pagination. My data gives me 3 pages, but only the first click on the numbers of the pagination works (doesn't matter what number I clicked). After this, any click in any number just make the table content blink. Nothing in the table changed.
Anyone can help me with some suggestions what to do? Thank you!
EDIT:
Just fixed it. Check the answer please.
My code:
$('#table').DataTable({ lengthChange: false, pagingType: 'numbers', pageLength: 20, destroy: true, searching: false, info: false, processing: false, paging: true, language: { url: varEndPoint + 'libs/plugins/dataTables/localization/' + userLang + '.js' }, autoWidth: false, scrollCollapse: true, scrollY: '400px', serverSide: true, ajax: { url: 'Controller/Path', type: 'POST', dataType: 'json', data: { 'entity': 'owner', 'filter': 'owner'}, beforeSend: function () { $('body').prepend('Loading...'); }, complete: function () { $('.loader').remove(); }, columns: [ { data: 'name' }, { data: 'document' }, { data: 'account' } ], columnDefs: [ { targets: '_all', orderable: false } ] });