Why aren't the table parameters not being sent?
Why aren't the table parameters not being sent?

When I debug the code behind, I'm finding that the AJAX is not sending the appropriate query data like iDisplayLenght, iDisplayStart, iSortCol_O etc.
function CreateUserTabe() {
$('#UserTable').dataTable({
processing: true,
serverSide: true,
ajax: {
url: "../UsersDataHandler.ashx",
type: 'POST',
contentType: 'application/json',
data: function (d) { return JSON.stringify(d); }
},
language: {
processing: '<i class="fa fa-spinner fa-spin fa-3x fa-fw"></i><span class="sr-only">Loading...</span>'
},
columns: [
{ 'data': 'FirstName' },
{ 'data': 'LastName' },
{ 'data': 'Active' },
{ 'defaultContent': '<button type="button" class="btn btn-primary" onclick="ManageUser(this)">Manage</button>' }
],
//ajaxSource: 'UsersDataHandler.ashx',
rowId: 'UserId',
select: true,
deferRender: true
});
}
This discussion has been closed.
Answers
This doc describes the parameters sent and expected in the response for Datatables 1.10:
https://datatables.net/manual/server-side
The parameters you described are for Datatables 1.9:
https://legacy.datatables.net/usage/server-side
If you are needing the legacy parameters see this section of the server side doc:
https://datatables.net/manual/server-side#Legacy
Kevin