Is there a way to reproduce the pagination select box externally through the api? I basically want a button elsewhere on the page that when clicked would change the pagination amount
Have you tried this?
[code]
var oTable = $('#someTable').dataTable();
var oSettings = oTable.fnSettings();
// Change iDisplayLength
oSettings._iDisplayLength = 9; // or whatever number you want here
[/code]
There isn't any - oSettings in an internal data store that DataTables uses for storing information about the table and its state. It isn't documented and is possible that aspects of it may change between releases. As such, typically it should be avoided unless you know what you are doing with it :-). Plug-in API functions can be used such as fnLengthChange ( http://datatables.net/plug-ins/api#fnLengthChange ) which will deal with the state update (I try to keep all plug-in API methods up-to-date with the current state of DataTables - although in fairness the settings object properties don't change much!).
Replies
[code]
var oTable = $('#someTable').dataTable();
var oSettings = oTable.fnSettings();
// Change iDisplayLength
oSettings._iDisplayLength = 9; // or whatever number you want here
[/code]
oSettings._iDisplayLength = 9;
When I try passing other settings with that format they don't seem to work. What is the methodology of changing other table settings in this way?
Allan