Setting sScrollX or sScrollY causes table headers to not be displayed

Setting sScrollX or sScrollY causes table headers to not be displayed

KevinioKevinio Posts: 3Questions: 0Answers: 0
edited November 2011 in DataTables 1.8
Hi all,

I am fairly new to datatbables but have been using it very successfully until I have come to very large table (43 columns) for which I need to use scrolling.

I using datatables version 1.8.2 and basically as soon as I set [quote]sScrollX[/quote] or [quote]sScrollY[/quote] the headers on my table disappear. Without these two properties the table works and displays perfectly as expected.

The initialisation code I have for my table is below:

[code]
$('#reportdata').dataTable({
bDestroy: true,
"aaSorting": [[0, "asc"]],
sPaginationType: "full_numbers",
"iDisplayLength": 25,
"sDom": "lfiprtip",
"sScrollX": "100%",
"sScrollY": "400",
"oLanguage": {
"sSearch": "Filter Records:"
}
});
[/code]

If you look at the generated source of the page the th columns are being outputted and not thrown away, they are just not visible. I have also tried setting the height property on the th cells just in case it was that but all to no avail.

Any help would be much appreciated.

Thanks

Kev

Replies

  • stevewalshstevewalsh Posts: 1Questions: 0Answers: 0
    Don't you need to specify pixels?

    so:
    "sScollY": "400px"

    Steve
This discussion has been closed.