FixedHeader works only after changing number of entries
FixedHeader works only after changing number of entries
bordin89
Posts: 5Questions: 2Answers: 0
Hi all,
I added FixedHeaders to a DataTable. I don't know where I'm getting it wrong, but the plugin works only if I change the number of entries, it seems that it doesn't get triggered on load. This is the address of the page in question.
pvcbacteria.org/mywiki/pipeline-tables/Blastopirellula_marina_test.html
I'd appreciate any suggestion!
Thanks!
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
This occurs because your table is not visible when you initialize it.
You need to use
fixedHeader.adjust()
method to recalculate the position of the table and redraw the fixed elements.From the official documentation:
Use the code below for
showPage()
function.See more articles about jQuery DataTables on gyrocode.com.
That solved it! Thanks a lot!