sScrollY creating whitespace below table
sScrollY creating whitespace below table
Each of my rows is 145px tall. If I set sScrollY: 1450px (10 rows) it works fine on tables with 10+ rows, but when there are fewer rows its still setting the table to a fixed height of 1450px.
Is there a setting I'm missing somewhere that keeps the sScrollY from fixing the table height when the table doesn't have/need a scroll bar?
I'm initializing in the footer with this (Using datatables 1.9.4):
[code]jQuery(document).ready(function($) {
$('#datatable').dataTable({
"bPaginate": false,
"bFilter": false,
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"bStateSave": true,
// display everything
"aaSorting": [
[1, "asc"]
],
// Sort by second column ascending
"aoColumns": [null, null,
{
"sType": "string",
"asSorting": [ "desc", "asc"]
}, {
"sType": "string"
}],
"sScrollY": "1450px",
});
});[/code]
Is there a setting I'm missing somewhere that keeps the sScrollY from fixing the table height when the table doesn't have/need a scroll bar?
I'm initializing in the footer with this (Using datatables 1.9.4):
[code]jQuery(document).ready(function($) {
$('#datatable').dataTable({
"bPaginate": false,
"bFilter": false,
"bSort": true,
"bInfo": false,
"bAutoWidth": false,
"bStateSave": true,
// display everything
"aaSorting": [
[1, "asc"]
],
// Sort by second column ascending
"aoColumns": [null, null,
{
"sType": "string",
"asSorting": [ "desc", "asc"]
}, {
"sType": "string"
}],
"sScrollY": "1450px",
});
});[/code]
This discussion has been closed.
Replies
Allan