≡
×
Plus
Manual
Examples
Reference
Download
Blog
Community
Support
Scrolling and Resizing
Scrolling and Resizing
lynn
Posts: 7
Questions: 0
Answers: 0
October 2012
edited October 2012
in
Bug reports
If you enable
sScrollY
and resize the browser window then the column widths will adjust to the new window size but the header cell widths will stay the same. Which causes the headers to not be aligned with the columns.
Replies
robertbrower
Posts: 158
Questions: 1
Answers: 0
October 2012
var table = document.getElementById("Table1");
var $dataTable = $(table).dataTable();
$dataTable.fnAdjustColumnSizing(false);
// TableTools
if (typeof(TableTools) != "undefined") {
var tableTools = TableTools.fnGetInstance(table);
if (tableTools != null && tableTools.fnResizeRequired()) {
tableTools.fnResizeButtons();
}
}
Cheers,
Robert
This discussion has been closed.
Replies
var $dataTable = $(table).dataTable();
$dataTable.fnAdjustColumnSizing(false);
// TableTools
if (typeof(TableTools) != "undefined") {
var tableTools = TableTools.fnGetInstance(table);
if (tableTools != null && tableTools.fnResizeRequired()) {
tableTools.fnResizeButtons();
}
}
Cheers,
Robert