Show all rows without pagination?

Show all rows without pagination?

mccloudmccloud Posts: 35Questions: 15Answers: 2

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

Answers

  • mccloudmccloud Posts: 35Questions: 15Answers: 2
    edited February 2018

    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: [

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin

    Use paging and set it to be false to disable paging.

    Note that it is a DataTables option (as is lengthMenu) - not an Editor one.

    Allan

  • mccloudmccloud Posts: 35Questions: 15Answers: 2

    How can it be done on a table created with the generator?

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin

    Add the paging option into the DataTables configuration and set it to be false. This example shows paging disabled in the DataTable initialisation.

    Allan

  • mccloudmccloud Posts: 35Questions: 15Answers: 2
    edited February 2018

    Is there no way of changing the number of rows shown in the Editor generated file. The example you quote merely disables paging.

  • allanallan Posts: 63,494Questions: 1Answers: 10,470 Site admin
    Answer ✓

    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

This discussion has been closed.