Data is not displayed although info shows correct numbre of records and empty rows odd/even
Data is not displayed although info shows correct numbre of records and empty rows odd/even
The following code does produce rows, but all rows are empty.
function Deelnemers(){
var table = jQuery('#deelnemers');
var public_spreadsheet_url = 'https://docs.google.com/spreadsheets/d/1HkBjID68nmFGL4nL1TXGWmD_5CtexIEeebgc0jDQzYk/pubhtml';
Tabletop.init({ key: public_spreadsheet_url,
callback: showInfo,
simpleSheet: true,
debug: false });
function showInfo(data) {
table.DataTable({
data: data,
stateSave: true,
processing: true,
dom: '<if>rt<lp>',
paging: false,
columns: [
{title: 'SN', 'sTitle': 'Start#', 'sClass': 'center', sWidth: '5%'},
{title: 'Naam Heer', 'sTitle': 'Naam Heer', 'sClass': 'left', sWidth: '35%'},
{title: 'Naam Dame', 'sTitle': 'Naam Dame', 'sClass': 'left', sWidth: '35%'},
{title: 'Klassen', 'sTitle': 'Klasse(n)', 'sClass': 'left', sWidth: '15%'},
{title: 'Leraar', 'sTitle': 'Leraar(Afk.)', 'sClass': 'left', sWidth: '10%'},
],
order: [[0, "asc"]],
language: {
"decimal": "",
"emptyTable": "Geen gegevens beschikbaar in de tabel",
"info": "_START_ tot _END_ van _TOTAL_ items",
"infoEmpty": "0 tot 0 van 0 rijen",
"infoFiltered": "(gefilterd uit _MAX_ totaal aantal items)",
"infoPostFix": "",
"thousands": ".",
"lengthMenu": "Aantal _MENU_ items",
"loadingRecords": "Laden...",
"processing": "Verwerken...",
"search": "Zoeken:",
"zeroRecords": "Geen passende items gevonden",
"paginate": {
"first": "Eerste",
"last": "Laatste",
"next": "Volgende",
"previous": "Vorige"
},
"aria": {
"sortAscending": ": activeren voor oplopende sortering",
"sortDescending": ": activeren voor aflopende sortering"
}
}
});
}
}
I have been looking to the console and I can see all records are receivedfrom Tabletop in the variable data as an array of Objects! What I see is a perfect table with header and the correct number of rows odd/even, but the data has not been added to the table data cells.
I am quite new to this, so I might have missed some instruction how to get them visible. Do I need to add a certain class to the
<
table>? What am I missing???