Help with the error
Help with the error
KevinT
Posts: 1Questions: 1Answers: 0
Older project that I am reviving. I get the error: DataTables warning: table id=dtable - Requested unkown parameter '16' for row 0. For more information about this error, please see http://datatables.net/tn/4.
in javascript console I get:
Uncaught TypeError: Cannot read property 'className' of undefined
My init code:
<script type="text/javascript" charset="utf-8">
$(document).ready( function () {
var oTable = $('#dtable').dataTable( {
"sDom": 'RCT<"clear">lfrtip',
"sPaginationType": "full_numbers",
"bStateSave": true,
"oTableTools": {
"sSwfPath": "/media/swf/copy_csv_xls_pdf.swf"
}
} );
$('#reset').click( function () {
ColReorder.fnReset( oTable );
return false;
} );
} );
</script>
<style type="text/css" title="currentStyle">
@import "/media/css/demo_table.css";
@import "/media/css/ColVis.css";
@import "/media/css/TableTools.css";
</style>
Where else is it getting the number of columns from ?
Thanks,
Kevin
This discussion has been closed.
Answers
Hi Kevin,
DataTables gets the number of columns from 3 places:
columns
optioncolumnDefs
optionThe HTML header counters the number of columns using the number of unique cells for each column. If you are using colspan, there must be a unique cell for each column that does not colspan.
For all three the number of columns must match (specifically the first two, although
columnDefs
can force additional columns to be added ifcolumnDefs.targets
is told to do so).Are you able to link me to the page so I can take a little look?
Thanks,
Allan