I have a lot of data in the datatable and it turns out that the response time is over, I'm using paging, but the problem is that I need to query all the data to make the total value. I tried to make a timeout, but that does not work, it keeps bugging me anyway.
params.Datatable = params.ElementTable.DataTable({
"ordering": false,
"iDisplayLength": 5,
"processing": true,
"serverSide": true,
"timeout": 300000,
"paging": params.Pagination == undefined ? true : params.Pagination,
"ajax": {
url: params.ElementTable.attr("data-url"),
dataType: "json",
data: params.Data,
type: "POST",
dataSrc: function (result) {
if (result.total)
for (var prop in result.total)
params.ElementTable.find("tfoot tr th[data-data='" + prop + "']").html(result.total[prop]);
if (params.Callback)
params.Callback(result);
return result.data;
}
}
And also tried to do:
params.Datatable = params.ElementTable.DataTable({
"ordering": false,
"iDisplayLength": 5,
"processing": true,
"serverSide": true,
"paging": params.Pagination == undefined ? true : params.Pagination,
"ajax": {
url: params.ElementTable.attr("data-url"),
dataType: "json",
data: params.Data,
type: "POST",
timeout: 300000,
dataSrc: function (result) {
if (result.total)
for (var prop in result.total)
params.ElementTable.find("tfoot tr th[data-data='" + prop + "']").html(result.total[prop]);
if (params.Callback)
params.Callback(result);
return result.data;
}
}
});