Update number of rows displayed based on table/container height?
Update number of rows displayed based on table/container height?
Hello all,
First would like to thank the developer of DataTables for such a great script!
I'm creating an app where I would like the number of rows that are displayed in the table to change based on the height of the table (and its container). I am using pagination, and do not want any vertical (or horizontal) scrollbars to ever appear.
In other words, when the user resizes their browser to a smaller size, less rows would be displayed per "page". And when the user resizes their browser to a larger size, more rows will be displayed per page. So basically, the rows should always fill up the height of the browser screen (provided of course that there are enough row records to do so).
I've searched the documentation and the forum for a few hours now, but couldn't find any information regarding how to do this. Perhaps I've overlooked something obvious?
Anyways, here's a simple test page I've set up (it's incomplete, obviously, but maybe it will help someone know how to provide the best solution)...
http://www.thebestinfo.org/datatables/test.html
Thanks!
First would like to thank the developer of DataTables for such a great script!
I'm creating an app where I would like the number of rows that are displayed in the table to change based on the height of the table (and its container). I am using pagination, and do not want any vertical (or horizontal) scrollbars to ever appear.
In other words, when the user resizes their browser to a smaller size, less rows would be displayed per "page". And when the user resizes their browser to a larger size, more rows will be displayed per page. So basically, the rows should always fill up the height of the browser screen (provided of course that there are enough row records to do so).
I've searched the documentation and the forum for a few hours now, but couldn't find any information regarding how to do this. Perhaps I've overlooked something obvious?
Anyways, here's a simple test page I've set up (it's incomplete, obviously, but maybe it will help someone know how to provide the best solution)...
http://www.thebestinfo.org/datatables/test.html
Thanks!
This discussion has been closed.
Replies
Sounds like a good topic for a future blog post (although it will be after 1.10 is released as things are currently going).
Regards,
Allan