Error in colspan
Error in colspan
y060121
Posts: 4Questions: 2Answers: 0
Getting the following error msg pops up
"DataTables warning (table id = 'report'): Requested unknown parameter '1' from the data source for row 0"
there row 0 is colspan = 8 in tbody, Iam bit newbie here so pls help thanks in advance :)
jQuery(document).ready(function($)
{
var datatable = $("#report").dataTable({
"sPaginationType": "bootstrap",
"sDom": "<'row'<'col-xs-3 col-left'l><'col-xs-9 col-right'<'export-data'T>f>r>t<'row'<'col-xs-3 col-left'i><'col-xs-9 col-right'p>>",
"oTableTools": {
"aButtons": [
{
"sExtends": "xls",
},
{
"sExtends": "pdf",
},
{
"sExtends": "print",
"fnSetText" : "Press 'esc' to return",
"fnClick": function (nButton, oConfig) {
datatable.fnSetColumnVis(0, false);
datatable.fnSetColumnVis(3, false);
this.fnPrint( true, oConfig );
window.print();
$(window).keyup(function(e) {
if (e.which == 27) {
datatable.fnSetColumnVis(0, true);
datatable.fnSetColumnVis(3, true);
}
});
},
},
]
},
});
$(".dataTables_wrapper select").select2({
minimumResultsForSearch: -1
});
});
This discussion has been closed.
Answers
Can you link to a page showing the issue please, as noted in the forum rules.
However, two important points about colspan in DataTables:
tbody
Allan