Width Problem
Width Problem
timschultz
Posts: 3Questions: 0Answers: 0
Hello,
I'm using the DataTables plug-in for a variety of tables (I think we're up to 50). These tables are of varying widths, with some requiring horizontal scrolling. I'm encountering an issue with the horizontal sizing for the smaller tables when I don't set sScrollX. Here is a screenshot:
http://imgur.com/epp9m
Here are my initialization parameters:
[code]
oTable = $(tableName).dataTable(
{
"bJQueryUI": true,
"bPaginate":false,
"bProcessing":true,
"bDeferRender":true,
"bSort":false,
"bScrollCollapse":true,
"oSearch":{"sSearch": "", "bRegex": true, "bSmart": false},
"sDom": 'TC<"H"ir>t<"F"i>',
"oTableTools": {
"sSwfPath": "/scripts/swf/copy_cvs_xls.swf",
"aButtons": [
"copy",
"print",
"csv"
]
},
"oColVis": {
"bRestore": true
}
}
);
[/code]
I've tried using the nightly builds to no avail.
Any ideas?
Thanks,
Tim
I'm using the DataTables plug-in for a variety of tables (I think we're up to 50). These tables are of varying widths, with some requiring horizontal scrolling. I'm encountering an issue with the horizontal sizing for the smaller tables when I don't set sScrollX. Here is a screenshot:
http://imgur.com/epp9m
Here are my initialization parameters:
[code]
oTable = $(tableName).dataTable(
{
"bJQueryUI": true,
"bPaginate":false,
"bProcessing":true,
"bDeferRender":true,
"bSort":false,
"bScrollCollapse":true,
"oSearch":{"sSearch": "", "bRegex": true, "bSmart": false},
"sDom": 'TC<"H"ir>t<"F"i>',
"oTableTools": {
"sSwfPath": "/scripts/swf/copy_cvs_xls.swf",
"aButtons": [
"copy",
"print",
"csv"
]
},
"oColVis": {
"bRestore": true
}
}
);
[/code]
I've tried using the nightly builds to no avail.
Any ideas?
Thanks,
Tim
This discussion has been closed.
Replies
http://datatables.net/ref#sScrollXInner
[quote]This property can be used to force a DataTable to use more width than it might otherwise do when x-scrolling is enabled. For example if you have a table which requires to be well spaced, this parameter is useful for "over-sizing" the table, and thus forcing scrolling. This property can by any CSS unit, or a number (in which case it will be treated as a pixel measurement).[/quote]
[code]
$(document).ready(function() {
$('#example').dataTable( {
"sScrollX": "100%",
"sScrollXInner": "110%"
} );
} );[/code]