Show Entries

Show Entries

nandernander Posts: 13Questions: 6Answers: 0

Hello could you tell me where to find the CDN's to customize the show entries option? I was looking to do something like this

$('#example').DataTable( {
"lengthMenu": [ 25, 50, 75, "All" ]
});

This question has an accepted answers - jump to answer

Answers

  • kthorngrenkthorngren Posts: 21,333Questions: 26Answers: 4,951

    I'm guessing you are asking about the All option. See the second example in the lengthMenu docs to see how to use All. If this doesn't answer your question then please provide specific details of what you want to change.

    Kevin

  • nandernander Posts: 13Questions: 6Answers: 0

    I tried this but still not working I have several functions so I may just be missing something or need to add something? Where can I post my code just to make sure I am adding multiple functions correctly?

  • kthorngrenkthorngren Posts: 21,333Questions: 26Answers: 4,951
    edited October 2022

    Post a link to your page or create a test case showing the problem you are trying to solve.
    https://datatables.net/manual/tech-notes/10#How-to-provide-a-test-case

    Or use Markdown formatting and copy/paste your relevant code into this thread.

    Kevin

  • nandernander Posts: 13Questions: 6Answers: 0
    edited October 2022
    $(document).ready(function () {
    
          $('#example').DataTable(
                { language: {
            searchPlaceholder: "Search records",
            search: "",
          }
        });
            var table = $('#doors').DataTable();
        $('#example tbody').off('click');
        $('#example tbody').on('click', 'img.icon-delete', function () {
            var data = table.row( this ).data();
            // alert( 'You clicked on '+data[0]+'\'s row' );
            alert("table click"+data[0]);
    
            $('#example').DataTable( {
                fixedHeader: true
            });
    
            $('#example').DataTable({
            // Enable the vertical scrolling
            // of data in DataTable to 200px
            scrollY: '200',
                    scroller: true
          });
            $('#example').dataTable( {
            "pageLength": 50
      } );
    $('#example').dataTable( {
            lengthMenu: [ [10, 25, 50, -1], [25, 50, 75, "All"] ]
      } );
    
        });
        });
    

    Edited by Allan - Syntax highlighting. Details on how to highlight code using markdown can be found in this guide.

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Answer ✓

    I count six different initialisations of DataTables there. Each with different parameters.

    See this part of the manual for combining multiple options into a single object.

    Allan

  • nandernander Posts: 13Questions: 6Answers: 0

    Nice I was not 100% sure at all how to use the multiple parameters option but your reply clarified it and I fixed. Thank you!

Sign In or Register to comment.