启用行分组时,“列过滤器”中的标题消失
我的代码是这样的:http://jsfiddle.net/oscar11/trp14hxk/
...
function initTable(hasRowGrouping){
$('#example').dataTable({
"bDestroy": true,
"bLengthChange": false,
"bPaginate": false,
"bJQueryUI": true,
"fnCreatedRow": function (nRow, aData, iDataIndex){
$(nRow).css('background-color', /*oData.colour*/ '#99F');
}
}).columnFilter({
sPlaceHolder: "head:before",
aoColumns: [
{ type: "text" },
{ type: "text" },
{ type: "text" },
{ type: "text" },
{ type: "text" }
]
});
...
谢谢
答案 0 :(得分:0)
您可以通过在此JSFiddle链接中修改 columnFilter 来实现此目的:http://jsfiddle.net/trp14hxk/2/
...
function initTable(hasRowGrouping){
$('#example').dataTable({
"bDestroy": true,
"bLengthChange": false,
"bPaginate": false,
"bJQueryUI": true,
"fnCreatedRow": function (nRow, aData, iDataIndex){
$(nRow).css('background-color', /*oData.colour*/ '#99F');
}
}).columnFilter({
sPlaceHolder: "head:before",
aoColumns: [
null,
null,
null,
null,
null,
]
});
...