How would I create a button that shows all rows without pagination? or increase the number of rows shown per page.?
This question has an accepted answers - jump to answer
I have attempted to use this:
(function($){ $(document).ready(function() { var editor = new $.fn.dataTable.Editor( { ajax: 'php/table.refs.php', table: '#refs', "lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]], fields: [
(function($){
$(document).ready(function() {
var editor = new $.fn.dataTable.Editor( {
ajax: 'php/table.refs.php',
table: '#refs',
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
fields: [
Use paging and set it to be false to disable paging.
paging
false
Note that it is a DataTables option (as is lengthMenu) - not an Editor one.
lengthMenu
Allan
How can it be done on a table created with the generator?
Add the paging option into the DataTables configuration and set it to be false. This example shows paging disabled in the DataTable initialisation.
Is there no way of changing the number of rows shown in the Editor generated file. The example you quote merely disables paging.
Your original question was how to disable pagination - the paging option is how to do that.
If you want to increase the number of records per page use pageLength.
pageLength
The full list of options is available here.
It looks like you're new here. If you want to get involved, click one of these buttons!
Answers
I have attempted to use this:
(function($){
$(document).ready(function() {
var editor = new $.fn.dataTable.Editor( {
ajax: 'php/table.refs.php',
table: '#refs',
"lengthMenu": [[10, 25, 50, -1], [10, 25, 50, "All"]],
fields: [
Use
paging
and set it to befalse
to disable paging.Note that it is a DataTables option (as is
lengthMenu
) - not an Editor one.Allan
How can it be done on a table created with the generator?
Add the
paging
option into the DataTables configuration and set it to be false. This example shows paging disabled in the DataTable initialisation.Allan
Is there no way of changing the number of rows shown in the Editor generated file. The example you quote merely disables paging.
Your original question was how to disable pagination - the
paging
option is how to do that.If you want to increase the number of records per page use
pageLength
.The full list of options is available here.
Allan