Can you please give an example or hint where to look to make datatable with pagination not shown when lesser than N rows?
This question has an accepted answers - jump to answer
Hi @Evgeniy Vasyliev ,
Paging is an initialisation option - paging - so you can't change the value after initialisation. If the table is in the DOM, you can just count the rows with $('table tbody tr').length then set the option at initialisation. If you're getting the rows from Ajax, you can do some logic in initComplete, count the rows page.info(). You could either set the page length long so all the rows are shown, or destroy() and reinitialise with paging disabled.
$('table tbody tr').length
Hope that helps,
Thank you, helpful.
It looks like you're new here. If you want to get involved, click one of these buttons!
DataTables designed and created by SpryMedia Ltd.
SpryMedia Ltd is registered in Scotland, company no. SC456502.