I faced same problem. I solved it with fake AJAX response. Here's some code to show how it works:
Variables:
var skipAjax = false, // flag to use fake AJAX
skipAjaxDrawValue = 0; // draw sent to server needs to match draw returned by server
DataTable AJAX definition:
ajax: {
url: ajaxURL,
type: 'POST',
data: function(data) { //this function allows interaction with data to be passed to server
if (skipAjax) { //if fake AJAX flag is set
skipAjaxDrawValue = data.draw; //get draw value to be sent to server
}
return data; //pass on data to be sent to server
},
beforeSend: function(jqXHR, settings) { //this function allows to interact with AJAX object just before data is sent to server
if (skipAjax) { //if fake AJAX flag is set
var lastResponse = dataTable.ajax.json(); //get last server response
lastResponse.draw = skipAjaxDrawValue; //change draw value to match draw value of current request
this.success(lastResponse); //call success function of current AJAX object (while passing fake data) which is used by DataTable on successful response from server
skipAjax = false; //reset the flag
return false; //cancel current AJAX request
}
}
}
How to use:
skipAjax = true; //set the fake AJAX flag
dataTable.draw('page'); //call draw function of a DataTable requesting to re-draw just the current page
$('#mytable').data('skipAjax', true)
etc. – Prudence