I cannot use the fixedheader option.
I cannot use the fixedheader option.
martinp14
Posts: 4Questions: 2Answers: 0
hi,
(sorry if my english is bad)
When I use the option to set my header I get this: "DataTables warning: table id=myTable - Cannot reinitialise DataTable. For more information about this error, please see http://datatables.net/tn/3".
I read the page but still don't understand how to do it. Where should I place my code?
This discussion has been closed.
Answers
Without seeing what you are doing its hard to say. My guess is you are initializing the FixedHeader separately from another Datatables initialization as shown in the Diagnosis section of the technote. If this is the case then combine it with the other as shown in the Single initialization section.
If this doesn't help then please post a link to your page or a test case showing the problem so we can help debug.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Thanks I found my mistake. But it still doesn't work. When I scroll my page the header does not attach but appears at the bottom of my page. If anyone has already had this problem?
Sounds like a CSS issue. Without seeing the page or a test case showing the issue it will be difficult to guess. Make sure you have all the proper Datatables JS and CSS files for the styling framework (if any) that you are using. Use the Download Builder for this. Another common mistake is the use of Datatables scrolling features like
scrollX
which isn't compatible with FixedHeader.Kevin
Here is a screenshot of the end of my page with the header at the bottom. My tables scroll horizontally but I don't have the scrollX: true option in my table initialization. Is she already activating basic?
Also my tables that have few columns do the same so I don't think it's scrollX?
I think it's more from CSS like you said.