【发布时间】:2015-09-23 08:53:18
【问题描述】:
我一直在尝试编辑我的数据表的“显示条目”的下拉选项。默认值为 10,即页面包含 10 行,但我想首先在一页中显示所有行。我的代码如下:
$(document).ready(function () {
$('#multiServiceJobTable').dataTable().columnFilter({
aoColumns: [
null,
{type: "select"},
{type: "select"},
{type: "select"},
{type: "select"},
{type: "select"},
{type: "select"},
{type: "select"}
],
aLengthMenu: [
[25, 50, 100, 200, -1],
[25, 50, 100, 200, "All"]
],
iDisplayLength: -1
});
$('#multiServiceJobTable tfoot tr').insertAfter($('#multiServiceJobTable thead tr'));
});
这是一个非常简单的表。我使用的是 1.9 版数据表。
【问题讨论】:
标签: jquery datatables