DataTables

https://github.com/DataTables/DataTablesjquery

DataTables is a table enhancing plug-in for the jQuery Javascript library, adding sorting, paging and filtering abilities to plain HTML tables with minimal effort. The stated goal of DataTables is:git

To enhance the accessibility of data in HTML tables.github

To meet this goal, DataTables is developed with two distinct groups of users in mind:ajax

  • You the developers using DataTables. For developers DataTables provides a wide array of options for how data should be obtained, displayed and acted upon, along with an extensive API for accessing and manipulating the table.ide

  • End users. For those using the interface DataTables presents, actions to get the most from the information contained in tables, such as sorting and filtering, along with paging and scrolling of the data in table, are easy to use, intuitive and fast.ui

 

問題1 Cannot read property 'aDataSort' of undefined

https://stackoverflow.com/questions/28454203/jquery-datatables-cannot-read-property-adatasort-of-undefinedthis

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 bespa

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

 

問題2 隱藏掉search搜索框以及show entries

bLengthChange: false,
searching: false,.net

 

問題3  Cannot read property 'length' of undefined

https://datatables.net/manual/ajaxcode

和ajax的返回值有關係

相關文章
相關標籤/搜索