JQuery Datatables : Cannot read property ‘aDataSort’ of undefined

It’s important that your THEAD not be empty in table.As dataTable requires you to specify the number of columns of the expected data .
As per your data it should be

<table id="datatable">
    <thead>
        <tr>
            <th>Subscriber ID</th>
            <th>Install Location</th>
            <th>Subscriber Name</th>
            <th>some data</th>
        </tr>
    </thead>
</table>

Leave a Comment