Change default entries

Change default entries

ims designims design Posts: 2Questions: 1Answers: 0

Hi, i want change defaul numbers of rows showed by default, by default show 10 records, i want show 50 or 100 records, i found this code:
$('#example').dataTable( {
"pageLength": 50
} );
Where i must insert this code for run fine? I tried insert this code between open and close tag head and at bottom before close tag body but this solution don't change default settings.
How can i solve?

Answers

  • tangerinetangerine Posts: 3,348Questions: 36Answers: 394

    "pageLength" is one of DataTables configuration options, which are set at initialisation time.
    In other words, put the "pageLength" line into your DataTables initialisation code.

  • ims designims design Posts: 2Questions: 1Answers: 0

    which file should I edit?

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765

    which file should I edit?

    The file to edit is based on your deployment. You will need to find the file that has your Datatables initialization code which will look similar to the code you posted above.

    Kevin

This discussion has been closed.