sScrollY ignored completely

sScrollY ignored completely

andrewbeeandrewbee Posts: 3Questions: 0Answers: 0
edited March 2012 in General
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

Replies

  • Mina_MagdyMina_Magdy Posts: 1Questions: 0Answers: 0
    edited October 2012
    Make sure bScrollCollapse option is not set to True

    Sorry this comment, its irrelevant to your question but that was a reason why sScrollY wasn't working for me
  • allanallan Posts: 63,534Questions: 1Answers: 10,475 Site admin
    I think in this case, this is the problem:

    > "sDom": '<"top"p>f',

    You don't' have a 't' option in there - so the table isn't being inserted into the DOM!

    Allan
This discussion has been closed.