fixed header doesn't work !
fixed header doesn't work !
FIRST: in my html page i have:
<link rel="stylesheet" type="text/css" href="assets/DataTables/FixedHeader-3.1.4/css/fixedHeader.dataTables.css">
SECOND: i have this config.js file:
$(document).ready(function() {
$('#showdata').DataTable(
{
"searching": true, // search
"ordering": true, // ordering columns
"paging": true, // pagination
"lengthMenu": [[10, 50, 100, -1], [10, 50, 100, "all"]], // elements
"fixedHeader": true, // doesn't work !
fixedHeader: {header: true} // doesn't work !
}
);
});
THIRD: i have this simple table:
id | inserito_da | colonna_A | col_b | colonna_dddddd | colonna_eeeeeeeeee | colonna_fffffff | colonna_gggg | colonna_hhhh | colonna_iiii | colonna_jjjjj | colonna_kkkk |
---|---|---|---|---|---|---|---|---|---|---|---|
000001e | Mori1- | 06/06/2019 | 0.00 | g1a | h1m | i1m | j1m | k1m | |||
000002e | Mori1- | 21/06/2019 | 0.00 | d2 | Agrigento | g2 | h2 | i2 | j2 | k2 | |
000003e | Mori1- | 17/05/2019 | 99999.90 | d2 lunghissima sdafs... | agrigento | prova2b | g11 | h1 | i3 | j3 | 3 |
000004e | Mori1- | 18/05/2019 | 333.00 | 32121dhdfghfg | cassano d`adda | prova2b | |||||
000005e | Mori1- | 30/06/2019 | 0.00 | corretto | |||||||
000006e | Mori1- | 18/05/2019 | 8888.00 | d8 | prova2b | g8 | h8 | i8 | j8 | k88 lunghidssima dfg... | |
000007e | Mori1- | 0.00 | 12345678901234567890 | ||||||||
000008e | Mori1- | 15.58 | ____________________... | ||||||||
000009e | Mori1- | 01/01/1970 | 15.50 | ||||||||
000012e | Mori1- | 26/05/2019 | 0.00 | ||||||||
000013e | Mori1- | 0.00 | bbèèòlèòlèòl | ||||||||
000014e | Mori1- | 19/05/2019 | 0.00 | ||||||||
000015e | Mori1- | 19/05/2019 | 0.00 |
FINALLY: i have this css: can be this the problem ?
.fixedcontainer
{
float:left;
width:100%;
padding:0 35px;
overflow-x:auto;
}
.contenuto
{
height:555px;
overflow-x:auto;
overflow-y:auto;
}
I don't know why doesn't work !!!
Someone can help me ?
Thanks
Answers
Are you including the FixedHeader extension javascript?
https://datatables.net/extensions/fixedheader/
yes (I forgot to write it in the previous post):
<link rel="stylesheet" type="text/css" href="assets/DataTables/FixedHeader-3.1.4/css/fixedHeader.dataTables.css">
And, also, i have disabled my css, but the problem remains
If you want, i can send a zip file !
Thanks !!!!!!!!
this is:
<script src="assets/DataTables/FixedHeader-3.1.4/js/fixedHeader.dataTables.js"></script>
The best thing to do is to build a test case that replicates the issue so we can take a look at the running code.
https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case
Kevin