Share On Twitter Facebook Google+ LinkedIn Pinterest Tumblr Reddit
Question

jquery.min.js:2 Uncaught TypeError: Cannot read property 'aDataSort' of undefined

Tags: jquery datatables
Date:
Status:Resolved
Question Id:32

Uncaught TypeError: Cannot read property 'aDataSort' of undefined

    at pa (jquery.dataTables.min.js:83)

    at Pa (jquery.dataTables.min.js:87)

    at f (jquery.dataTables.min.js:108)

    at HTMLTableElement.<anonymous> (jquery.dataTables.min.js:110)

    at Function.each (VM31054 jquery.min.js:2)

    at S.fn.init.each (VM31054 jquery.min.js:2)

    at S.fn.init.u [as dataTable] (jquery.dataTables.min.js:100)

    at S.fn.init.k.fn.DataTable (jquery.dataTables.min.js:184)

    at HTMLDocument.<anonymous> (551245134:489)

    at e (VM31054 jquery.min.js:2)

 

 var table = $('#dt1').DataTable( {
                paging:false,
                resonsive:true,
                scrollY: tableSize,
                scrollCollapse: true,
       } );
Answer
Date:
Correct:Yes

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>
Answer
Date:
Correct:No

What if I have a requirement that involves configuring columns and the number of said columns at Runtime? How can I implement code for the aforementioned requirement?

Your Answer

Review Your Answer