close

[Solved] JQuery Datatables : Cannot read property ‘aDataSort’ of undefined

Hello Guys, How are you all? Hope You all Are Fine. Today I get the following error JQuery Datatables : Cannot read property ‘aDataSort’ of undefined in javascript. So Here I am Explain to you all the possible solutions here.

Without wasting your time, Let’s start This Article to Solve This Error.

How JQuery Datatables : Cannot read property ‘aDataSort’ of undefined Error Occurs?

Today I get the following error JQuery Datatables : Cannot read property ‘aDataSort’ of undefined in javascript.

How To Solve JQuery Datatables : Cannot read property ‘aDataSort’ of undefined Error ?

  1. How To Solve JQuery Datatables : Cannot read property 'aDataSort' of undefined Error ?

    To Solve JQuery Datatables : Cannot read property 'aDataSort' of undefined Error Also had this issue, This array was out of range:
    order: [1, 'asc'],

  2. JQuery Datatables : Cannot read property 'aDataSort' of undefined

    To Solve JQuery Datatables : Cannot read property 'aDataSort' of undefined Error Also had this issue, This array was out of range:
    order: [1, 'asc'],

Solution 1

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>

Solution 2

Also had this issue, This array was out of range:

order: [1, 'asc'],

Summery

It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you? Thank You.

Also Read

Leave a Comment