I created a data table on an HTML table with the following code.
$('#ContractsView').dataTable({
"aaSorting": []
});
This runs fine when the table is empty
When this code runs for a table which has rows I get this error:
Unhandled exception at line 669, column 8 in https://localhost:44308/Scripts/jquery.dataTables.js
0x800a138f - JavaScript runtime error: Unable to get property 'className' of undefined or null reference
At this code
/* Classes */
if ( bClass )
{
nCell.className += ' '+oCol.sClass;
}
I have two other html tables which are entered the same way before hand.
$(document).ready(function () {
$('#FundDocsView').dataTable({
"aaSorting" : []
});
$('#PRView').dataTable({
"aaSorting": []
});
$('#ContractsView').dataTable({
"aaSorting": []
});
});
They run with no problem. The ContractsView tables runs fine when there is no data,
but as soon as the table is populated this error occurs
I am confused what would cause this error.