WebFeb 4, 2013 · In my case I want to do endless pagination, the problem is that after window resize, the height of dataTables_scrollBody stay fixed, so I have to adjust the oScroll to show the table data with scrolling bar. Setting the dataTables_scrollBody height will work when window size change, but after table redraw it will roll back using the old ... WebNov 28, 2008 · Using the plug-in is very simple - include the page resizing plug-in from the DataTables CDN on your page: JS. Then select one of the following two options to enable this feature for your table: Option 1: Add the pageResize option to your DataTables initialisation: Javascript. 1. 2.
Whats the best way to set height of datatables …
WebMar 3, 2009 · 61. The issue is caused because dataTable must calculate its width - but when used inside a tab, it's not visible, hence can't calculate the widths. The solution is to call 'fnAdjustColumnSizing' when the tab shows. WebJun 21, 2013 · do not need to come up with various crutches, table header width not aligned with body, because due to the fact that the table did not have enough time to fill in the data for this, do setTimeout. setTimeout (function () { //your datatable code }, 1000); Share. Follow. answered Dec 28, 2024 at 11:29. citation west side story
Jquery Datatables Adjust the size of table to fit the screen
WebAug 20, 2015 · I am trying to figure out a way to adjust the height of datatables based on the screen size. ... { //set the main frame height on page load and page resize … WebThis method is provided to have DataTables recalculate the columns sizes, based on the data in the table and the size applied to the columns (in the DOM, CSS or through the columns.widthparameter). Call it when the table becomes visible if hidden when initialised (for example in a tab) or when the data changes significantly. WebFeb 15, 2016 · I have a datatable with live scrolling feature. The table fits fine in my development machine but the user of this app has larger screen.It would be good if the datatable fits according to the screen size. Also the height of the datatable should get adjusted with more number of rows for live scroll. Currently I have 15 rows for live scrolling. citation wine glass