Trying to filter a hidden Column
Trying to filter a hidden Column
Link to test case: http://live.datatables.net/yeteleqo/1/edit
Debugger code (debug.datatables.net):
Error messages shown: None
Description of problem: Hello, as I want to build a compact table, I would like to add a drop down list on a hidden column.
I have added two drop down selections, which work ok.
In a question at
https://datatables.net/forums/discussion/53214/individual-column-filtering-on-hidden-column
- my interpretation is that Colin's suggests the position of the filter ddl can be determined by the appendTo line - (line 26 in that example).
I have told my 2nd ddl to display above the first column (0) - i.e. .appendTo($(column.footer(0)).empty()) but it is staying firmly above column 2, whether that column is shown or hidden.
Is my interpretation wrong; how would I do this please ?
My example is at: http://live.datatables.net/yeteleqo/1/edit
Thanks, Rob
This question has an accepted answers - jump to answer
Answers
Is the issue - the
footer()
method doesn’t take a parameter, rather it just returns the footer for the selected column - in this case column index 2 (the 0 is ignored sincefooter()
doesn’t do anything with parameters.This is the updated example taking that into account.
Allan
Hello Allan, your solution works very well, and the filter is above the desired column. Thank you for explaining the issue. Rob