I am using Datatables to display tabular data in my Web application, and have configured it to make use of server-side processing, i.e. query the server via AJAX for filtered da
The solution is to employ DataTables' fnServerParams option, which allows you to add custom parameters to be sent in the XMLHttpRequest sent to the server. For example:
$(document).ready(function() {
$('#example').dataTable({
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "/IndexXhr",
"fnServerParams": function (aoData) {
var includeUsuallyIgnored = $("#include-checkbox").is(":checked");
aoData.push({name: "includeUsuallyIgnored", value: includeUsuallyIgnored});
}
});
});