Default element to show num of entries is select[name=datatable_length].
How can I change this num with, for example on click:
[code]10
20
30
40[/code]
...
oSettings._iDisplayLength =displayleni;
oTable.fnDraw(); // this will dump the user back on page 1, so you might want to calculate the correct page and jump to that page for them after a change
}
[/code]
Replies
[code]
function change_DisplayLength(displaylen) {
oTable = $('#yourTable').dataTable( { bRetrieve: true } );
oSettings = oTable.fnSettings();
oSettings._iDisplayLength =displayleni;
oTable.fnDraw(); // this will dump the user back on page 1, so you might want to calculate the correct page and jump to that page for them after a change
}
[/code]