Como llenar la tabla
Como llenar la tabla
Estoy intentando llenar la tabla con Server-side processing pero no logro que funcione, todo va bien asta el data trae los datos bien pero cuando llega a dataFilter no toma la respuesta y falla
agradezco su colaboración
I'm trying to fill the table with server side processing but I can't get it to work, everything is fine until the data fetches the data fine but when it gets to dataFilter it doesn't take the response and fails
I appreciate your collaboration
$('#tbElemItems').DataTable({
"processing": true,
serverSide: true,
ajax: {
data: function (dtParms) {
return JSON.stringify(CrearPedido2.Info(JSON.stringify(dtParms),1).value)
} ,
dataFilter: function (res) {
var parsed = JSON.parse(res);
return JSON.stringify(parsed.d);
}
}
});
Answers
What is "dataFilter" supposed to be?
I see here that there is an "ajax" option but I can't find a "dataFilter" option:
https://datatables.net/reference/option/
I found something on "ajax.dataFilter" on this page. Seems to be something undocumented. So if "ajax.dataFilter" exists it is part of the "ajax" option and not an option by itself:
https://www.datatables.net/manual/server-side
It looks like "ajax.dataSrc" is the new "ajax.dataFilter".
Please see this:
https://datatables.net/reference/option/ajax.dataSrc