sScrollY ignored completely
sScrollY ignored completely
Hi,
I am trying to make the table body scrollable using sScrollY, but this parameter makes no difference whatsoever to the appearance of the table.
Here is the table initialization code:
oTable = $('#tablewidget').dataTable(
{
"bAutoWidth": false,
"aoColumns":
[
{ "sWidth" : "5%", "bSortable": "false" },
{ "sWidth" : "10%", "iDataSort" : 8 },
{ "sWidth" : "17%" },
{ "sWidth" : "15%" },
{ "sWidth" : "15%", "sType": "listTypeCount" },
{ "sWidth" : "15%" },
{ "sWidth" : "12%" },
{ "sWidth" : "22%" },
{"bVisible" : false}
],
"sScrollY": "200px", // ********* Scrolling parameter
"aaSorting": [[1,'desc']],
"sPaginationType": "full_numbers",
"sDom": '<"top"p>f',
"oLanguage": {
"sSearch":'Search for: ',
"oPaginate": {
"sNext" : "Next",
"sPrevious" : "Prev."
}
}
,"iDisplayLength": 10 //control how many records per page to display. Defaulting to 10
}
);
Any help appreciated!
Thanks
I am trying to make the table body scrollable using sScrollY, but this parameter makes no difference whatsoever to the appearance of the table.
Here is the table initialization code:
oTable = $('#tablewidget').dataTable(
{
"bAutoWidth": false,
"aoColumns":
[
{ "sWidth" : "5%", "bSortable": "false" },
{ "sWidth" : "10%", "iDataSort" : 8 },
{ "sWidth" : "17%" },
{ "sWidth" : "15%" },
{ "sWidth" : "15%", "sType": "listTypeCount" },
{ "sWidth" : "15%" },
{ "sWidth" : "12%" },
{ "sWidth" : "22%" },
{"bVisible" : false}
],
"sScrollY": "200px", // ********* Scrolling parameter
"aaSorting": [[1,'desc']],
"sPaginationType": "full_numbers",
"sDom": '<"top"p>f',
"oLanguage": {
"sSearch":'Search for: ',
"oPaginate": {
"sNext" : "Next",
"sPrevious" : "Prev."
}
}
,"iDisplayLength": 10 //control how many records per page to display. Defaulting to 10
}
);
Any help appreciated!
Thanks
This discussion has been closed.
Replies
Sorry this comment, its irrelevant to your question but that was a reason why sScrollY wasn't working for me
> "sDom": '<"top"p>f',
You don't' have a 't' option in there - so the table isn't being inserted into the DOM!
Allan