Sorry if this has been discussed elsewhere but I could not find the solution.
I want to calculate an appropriate iDisplayLength at runtime based on the number of rows that fit on the page. Something along the lines of:
I've played with setting the table style to 100% but this just autofills to the end of the page with the preset iDisplayLength.
Currently, my code sets iDisplayLength in the default options:
Edit: This is for a custom GUI that renders and navigates between local htm pages. It is not available online. I ask this question more to see if this is possible and how it would be done. Please let me know if you require more details.
I want to calculate an appropriate iDisplayLength at runtime based on the number of rows that fit on the page. Something along the lines of:
floor((tableHeight - headerHeight - footerHeight) / rowHeight)
I've played with setting the table style to 100% but this just autofills to the end of the page with the preset iDisplayLength.
Currently, my code sets iDisplayLength in the default options:
DataTableUtils.getDefaultOptions = function() { var options; options = { iDisplayLength: 32, bAutoWidth: false, bJQueryUI: true, bSort: false, bFilter: false, bProcessing: true, bServerSide: true, sAjaxSource: 'notUsed', sDom: 't<"F"rip>', sScrollY: '900px', oLanguage: { sLengthMenu: '_MENU_' }, sPaginationType: 'full_numbers' }; return options; };
Edit: This is for a custom GUI that renders and navigates between local htm pages. It is not available online. I ask this question more to see if this is possible and how it would be done. Please let me know if you require more details.