user3176461
user3176461

Reputation: 5

datatable pagination not working

I have used datatable for pagination ,all is working fine except that next prev pagination is not showing first time ,after onkeypress event in search-box it is working fine, in console it is showing following error:

"TypeError: aoLocal[(i + iRowspan)][j] is undefined".  

Upvotes: 0

Views: 1221

Answers (1)

Check the table structure. Unended tags cause the undefined rowspan. For example, this structure breaks the table rendering with DataTables:

<table>
    <thead>
        <tr>
            <th>I am a visible header</th>
            <th>Hey! what the hell... Why am i invisible?</th>
        <tr>
    </thead>
</table>

Breaks due to the 2nd <tr> which should be </tr>.

Upvotes: 2

Related Questions