Draw and Ajax.Reload call next page
Draw and Ajax.Reload call next page
Hi,
I'm using datatables with serverside processing like this
var dt = $('.datatable').DataTable({
"searching": false,
"processing": false,
"serverSide": true,
"pageLength" : 50,
"ajax": "/Artikel/Data",
"columns": [ ... ] });
I'm trying to redraw the page when a button has been clicked. I've tried both:
dt.draw(true);
and
dt.ajax.reload(null, true);
But both call the server with an incremented draw, so when I look in Chrome's Network panel I see:
Data?draw=1 followed by Data?draw=2 when I click the button again.
Anyone has any idea what is causing this and how I can solve it?
Thanks!
Frank
Answers
Hi @frankvdlaar ,
Where is function you called ? on click of a button
Thanks
Koka
@vaishnavkoka
Thank's for your reply. I think I found the problem, the serverside processing was using the draw for paging instead of using start and length. My bad
@frankvdlaar ,
Be careful, if you are using
stateSave
Thanks
Koka