I had to combine both solutions of my problem. In my case, I want to do an infinite pagination, the problem is that after resizing the window, the height of the dataTables_scrollBody remains fixed, so I need to configure oScroll to display the table data by scrolling. Setting the height of dataTables_scrollBody will work when the window is resized, but after redrawing the table, it will be rolled back using the old sScrollY value, and the Neo code fixed it. :)
objDataTable.fnSettings().oScroll.sY = 101; objDataTable.fnDraw(); $('.dataTables_scrollBody').css('height', 400);
source share