Change the default number of rows to display on one “page”

后端 未结 5 663
梦谈多话
梦谈多话 2020-12-14 16:06

How can I specify the number of rows to display on a single \"page\" when using DataTables\'s pagination feature?

5条回答
  •  太阳男子
    2020-12-14 16:22

    for 10 records

    $('#datatable').DataTable({"pageLength": 10});
    

    for 50 records

    $('#datatable').DataTable({"pageLength": 50});
    

    for all records

    $('#datatable').DataTable({"pageLength": -1});
    

提交回复
热议问题