How do I change initialisation parameters at runtime?
How do I change initialisation parameters at runtime?
Belisarius
Posts: 26Questions: 0Answers: 0
Hi,
Apologies if this is obvious, but having initialised a table, how can I change parameters like bPagination so that I can turn pagination on and off and redraw the table as appropriate?
Cheers
Andy
Apologies if this is obvious, but having initialised a table, how can I change parameters like bPagination so that I can turn pagination on and off and redraw the table as appropriate?
Cheers
Andy
This discussion has been closed.
Replies
Have you had a look at the usage examples? For each configuration I've put a code example of how it can be used (click the 'Show details' link for that parameter. For example: http://datatables.net/usage . Also have a look at the basic initialisation examples from the top of that page.
Allan
Andy
Sorry, I misunderstood your intention. DataTables doesn't currently support feature switching after initialisation.
What you could do is give the appearance of enabling and disabling feature though. In the pagination example you could simply set the display length to be very long and the paging element to be display:none; to "disable paging". Then to re-enable show the paging element and set the length back to what it was. This kind of action could be done as a custom API plug-in.
Hope this helps,
Allan