1

私は DataTables を (成功して) 使用しており、ColumnFilter を取り込もうとしています。私のJSは次のようになります。

$(document).ready(function () {
    oTable = $('#ecTable').dataTable({
        "sScrollY": "550px",
        "sScrollX": "100%",
        "bPaginate": false,
        "bScrollCollapse": true,
        "bInfo": true,
        "bFilter": false,
        "bProcessing": true,
        "aaSorting": [[0, 'desc']]
    })

    .columnFilter({
        aoColumns: [
            null,
            null,
            { type: "select" },
            { type: "select" },
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null,
            null]
    });
});

テーブルのヘッダーとフッターは次のようになります。

<thead>
    <tr>
        <th>Listing Date</th>
        <th>Expiration Date</th>
        <th>Manufacturer</th>
        <th>Model</th>
        <th>Body Style</th>
        <th>Engine</th>
        <th>Year</th>
        <th>Mileage</th>
        <th>Ext. Color</th>
        <th>Int. Color</th>
        <th>Listing Price</th>
        <th>Comments</th>
        <th>Number Of Views</th>
        <th class="noSort">Navigation</th>
    </tr>
</thead>

   <tfoot>
        <tr>
            <th>Listing Date</th>
            <th>Expiration Date</th>
            <th>Manufacturer</th>
            <th>Model</th>
            <th>Body Style</th>
            <th>Engine</th>
            <th>Year</th>
            <th>Mileage</th>
            <th>Ext. Color</th>
            <th>Int. Color</th>
            <th>Listing Price</th>
            <th>Comments</th>
            <th>Number Of Views</th>
            <th></th>
        </tr>
    </tfoot>

Chrome でエラーが発生しません。結果として得られるデータ テーブルは、フィルター列がないことを除いて、本来あるべきものとまったく同じように見えます。生成されたソースを見ると、カラムフィルター用のJSがダウンロードされています。誰でも助けることができますか?

4

1 に答える 1

3

コメントを回答に昇格:

私はデータテーブルの専門家ではありませんが、この行はそれと関係がありますか?"bFilter": false,

于 2013-04-11T18:02:53.963 に答える