Is it possible to hide/show table controls dynamically?
Is it possible to hide/show table controls dynamically?
dogcatgoat
Posts: 38Questions: 0Answers: 0
Hi,
The search, show, page forward/back, and other controls on DataTables clutter working with small tables. I have several tables that usually get populated in my app which usually have between 0-20 entries. Is it possible to hide the controls for tables that only have say 10 or less entries? Is there a way to access the sDom variable dynamically?
Thank you.
The search, show, page forward/back, and other controls on DataTables clutter working with small tables. I have several tables that usually get populated in my app which usually have between 0-20 entries. Is it possible to hide the controls for tables that only have say 10 or less entries? Is there a way to access the sDom variable dynamically?
Thank you.
This discussion has been closed.
Replies
Thanks,
Allan
Thank you very much for your response.
I can see that there are other also elements such as:
dataTables_length
dataTables.info
dataTables.paginate
If I have multiple data tables, though, I wasn't sure how I can selectively turn on/off the display for each of them. Right now the div.XXX.css.('display','none') acts globally across all my tables. Ideally I would like to display tables with lengths such as 2, 41, 13, 0 on the same page and I would like the flexibility to hide the controls depending on the table size.
Thanks again :).
Allan
Thank you for your advice-- both techniques you suggested work!
kind regards