Best practice: using column searching with FixedHeader/FixedColumns
Best practice: using column searching with FixedHeader/FixedColumns
yishayh
Posts: 108Questions: 17Answers: 0
Hi,
What is the best practice for using this:
https://www.datatables.net/examples/api/multi_filter.html
With this:
https://datatables.net/extensions/fixedheader/
The example was written to be used in a simple datatable, should we use something like the following:
$('#XXX thead th').closest(".dataTables_scroll").find(".dataTables_scrollHeadInner table")
Or is there some better way of doing this?
Same question goes to FixedColumns.
I have additional related questions, but I'll ask them in other discussions and relate them back to this discussion.
Thanks,
Yishay
This discussion has been closed.
Answers
I would suggest having a second
tr
row in the table header and putting the filtering elements into one of the rows (so one controls sorting and the other does filtering).Allan
Hi Allan,
That's what we did.
I assume from your answer that using the code I mention is the best practice?
Any clue as to what might cause the input to be disabled?
Thanks,
Yishay
The code appears valid. There are various ways of doing it - using
table().header()
is probably the best way to get thethead
- although that won't always work in the case of FixedColumns since it splits the fixed elements off into its own table.No sorry. If it is disabled then something somewhere must be setting it as such.
Allan
Hi Allan,
thanks, I'll try to get some more information and than get back to you.
Have a nice day,
Yishay