ColumnFilter with three header rows
ColumnFilter with three header rows
miwoe
Posts: 14Questions: 2Answers: 0
I have a table with three header rows:
[code]
Table title
...column titles
...column filter row
...
[/code]
However, column filter can not be configured with this setup. Therefore, I have added another option "head:third" and added the LoC:
[code]
} else if (properties.sPlaceHolder == "head:third") {
if (oTable.fnSettings().bSortCellsTop) {
var tr = $("tr:first", oTable.fnSettings().nTHead).next().next().detach();
tr.appendTo($(oTable.fnSettings().nTHead));
aoFilterCells = oTable.fnSettings().aoHeader[2];
} else {
aoFilterCells = oTable.fnSettings().aoHeader[1];
}
}
[/code]
Then column filter is placing the filters in the third row. Just copied then body of head:after and added another next() invocation...
[code]
Table title
...column titles
...column filter row
...
[/code]
However, column filter can not be configured with this setup. Therefore, I have added another option "head:third" and added the LoC:
[code]
} else if (properties.sPlaceHolder == "head:third") {
if (oTable.fnSettings().bSortCellsTop) {
var tr = $("tr:first", oTable.fnSettings().nTHead).next().next().detach();
tr.appendTo($(oTable.fnSettings().nTHead));
aoFilterCells = oTable.fnSettings().aoHeader[2];
} else {
aoFilterCells = oTable.fnSettings().aoHeader[1];
}
}
[/code]
Then column filter is placing the filters in the third row. Just copied then body of head:after and added another next() invocation...
This discussion has been closed.
Replies
Allan