我正在使用 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。任何人都可以帮忙吗?