ScrollX problem
ScrollX problem
lidinsky
Posts: 3Questions: 1Answers: 0
Hello,
I have a problem with the ScrollX parameter. When I use it, the header and data are decided. The data under the header is shifted. It's weird that I didn't change anything, so 14 days ago everything was fine. Does anyone have any advice on what I can do about it? Thank you.
Replies
Sounds like you might not have all the correct Datatables CSS or JS files. Or you are using an extension, like FixedHeader that doesn't support the use of
scrollX
. Please provide a link to your apge or a test case replicating the issue so we can help debug.https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin
Thank you for answer. Unfortunately, I can't show the problem online because the site is on a server without the internet. Anyway, I'm sending at least a picture where the problem can be seen. Interestingly, I didn't change any CSS and JS files and before that it worked properly.
I use these scripts:
<link rel = "stylesheet" href = "https://cdn.datatables.net/1.10.21/css/jquery.dataTables.min.css">
<link rel = "stylesheet" href = "https://cdn.datatables.net/fixedheader/3.1.4/css/fixedHeader.bootstrap4.min.css">
<link rel = "stylesheet" href = "https://cdn.datatables.net/buttons/1.6.2/css/buttons.dataTables.min.css">
<link rel = "stylesheet" href = "https://cdn.datatables.net/fixedcolumns/3.3.1/css/fixedColumns.dataTables.min.css">
https://cdn.datatables.net/1.10.25/js/jquery.dataTables.min.js">
https://cdn.datatables.net/fixedheader/3.1.4/js/dataTables.fixedHeader.min.js">
js / dataTables.buttons.js">
https://cdn.datatables.net/buttons/1.6.2/js/buttons.colVis.min.js">
https://cdn.datatables.net/buttons/1.6.2/js/buttons.flash.min.js">
js / buttons.html5.js"> </script>
https://cdn.datatables.net/buttons/1.6.2/js/buttons.print.min.js">
https://cdn.datatables.net/select/1.3.0/js/dataTables.select.min.js">
https://cdn.datatables.net/fixedcolumns/3.3.3/js/dataTables.fixedColumns.min.js">
Thank you for answer.
I see you are loading both FixedHeader and FixedColuimns. Loading both is ok but if you try using both in the same Datatable you will see styling issues as they are not compatible. Are you using both? At a minimum post your Datatables initialization code so we can see how its configured. If there is nothing obvious from your Datatables init code we will need to see a running example of the problem to help debug. You can build a simple test case with dummy data to show the issue. Please see this page for more details:
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin