Is there a way to set the sScrollX dynamically?
Say, if I have more than 7 columns, then I need to set the sScrollX and then FixedColumn, else, I want the defaults.
Managed to get it done as follows.. FixedColumns were messing up with unnecessary scrollbars even when the number of columns were able to fit in. So eliminated FixedColumns if the columns are less than some.
[code]
matTable = $('#resultMatrix').dataTable(...
"sScrollX": "100%",
});
var tSettings = matTable.fnSettings();
if (tSettings.aoColumns.length > 10 ) {
new FixedColumns(matTable);
}
[/code]
Hope there is something better.
Replies
[code]
matTable = $('#resultMatrix').dataTable(...
"sScrollX": "100%",
});
var tSettings = matTable.fnSettings();
if (tSettings.aoColumns.length > 10 ) {
new FixedColumns(matTable);
}
[/code]
Hope there is something better.