Number of row

Number of row

benoit64benoit64 Posts: 3Questions: 1Answers: 0

Hello there

I want a statement that returns the number of rows in a data table?

Which use it?

Answers

  • mRendermRender Posts: 151Questions: 26Answers: 13
    $(document).ready(function() {
        $('#example').dataTable( {
            "info":    true
        } );
    } );
    

    Use info and set it to true. You'll get the number of rows that are currently displayed as well as the total number in the entire table.

  • allanallan Posts: 56,187Questions: 1Answers: 8,897 Site admin

    Use page.info() to get information about the data contained in a table. Or you could use rows() (table.rows().eq(0).length).

    Allan

  • benoit64benoit64 Posts: 3Questions: 1Answers: 0

    tank you

This discussion has been closed.