dynamically changing the height of the sScrollY
dynamically changing the height of the sScrollY
Srilakshmi
Posts: 35Questions: 6Answers: 0
in DataTables
Hi ,
I have initially set the value of sScrollY
"sScrollY":300px,
later,
on clicking the inner row I want to change the value of sScrollY to 100px,
hence in the format(d) function I used the following piece of code,
var Table = $('#example').dataTable();
var NewHeight = 100;
var oSettings = Table.fnSettings();
oSettings.oScroll.sY = NewHeight + "px";
Table.fnDraw();
but it does not work,
looking forward for a reply.
This discussion has been closed.
Replies
You want to avoid using the settings object as much as possible. it is considered to be private and settings values in it can cause unexpected things to happen.
At the moment, the way to set the height of the scrolling table is to use something like:
$('div.dataTables_scrollBody').height( 100 );
.Allan
Thanks allan