Data is not rendered in table - server-side processing
Data is not rendered in table - server-side processing
Debugger code (debug.datatables.net): https://debug.datatables.net/ihinev
Error messages shown: none
Description of problem:
I've switched from client-side to server-side processing due to lots of data rows - so far so good. However, the data, although available in the response, isn't rendered in the table itself. It shows the total number, the paging and so on, but doesn't show the data.
The json response:
{"draw":1,"recordsTotal":3118,"recordsFiltered":3118,"data":{"id":"6248","customer_id":"6339"....}}
the table:
/* Contacts Table */
var contactstable = $('#contactstable').DataTable({
language: {
url: datatablesajax.pluginDirURI + 'includes/datatables/datatables.german.json'
},
serverSide: true,
processing: true,
ajax: {
url: datatablesajax.url + '?action=getcontactstable'
},
columns: [
{ data: 'customer_id', title: 'Kd-Nr.' },
{ data: 'firstname', title: 'Vorname' },
{ data: 'lastname', title: 'Nachname' },
{ data: 'email', title: 'E-Mail' },
],
columnDefs: [
],
order: [[0, 'desc']],
autoFill: {
editor: contacteditor,
},
select: {
info: false,
},
responsive: true,
lengthChange: true,
rowId: 'customer_id',
dom: 'Bfitlp',
buttons: [
{ extend: "createitem", editor: contacteditor, },
{ extend: "edititem", editor: contacteditor, },
{ extend: "removeitem", editor: contacteditor, },
'copyitem', 'excelexport', 'reload',
],
paging: true,
deferRender: true,
});
The browser console isn't showing any errors and as mentioned the table just shows as empty. Where can I start to look?
Answers
Sorry, I just noticed my mistake
this issue is resolved and may be deleted from the forum!