How to reset iDisplayLength from Javascript?
How to reset iDisplayLength from Javascript?
I'm using DataTables for an iPad web app, and when the screen orientation changes (ie when user tilts the device) i need to redraw my table the exact set of rows that fits onscreen.
I'm assuming that I don't have to destroy the DataTables object and restart with a new iDisplayLength value?
Have perused the documentation but it's not clear on this point. In any case, what is the recommended method for updating the number of rows in the table, from Javascript?
I'm assuming that I don't have to destroy the DataTables object and restart with a new iDisplayLength value?
Have perused the documentation but it's not clear on this point. In any case, what is the recommended method for updating the number of rows in the table, from Javascript?
This discussion has been closed.
Replies
Sounds interesting! Would you be able to give us a link to your app when you are done (curiosity :-) )?
What you can do to change the display length is make use of this plug-in: http://datatables.net/plug-ins/api#fnLengthChange . Then there is an API function available which you can call with whatever number you want.
Allan