How to disable paging in jQuery Datatable?


I am using jQuery Datatable in one of my projects and I need to remove jQuery datatable paging and other related details like 'Showing 1 of 5 pages' etc, here is the image of the details which I want to remove

jquery-datatable-remove-pagination.png

How can I do this using latest jQuery data table?

Thanks


Asked by:- Vinnu
0
: 2535 At:- 4/18/2018 1:23:57 PM
jQuery jQuery Datatable pagination






2 Answers
profileImage Answered by:- vikas_jk

To disable paging in jQuery Datatable, you need to make paging: false, When you initialize datatable in jQuery

$(document).ready(function() {
    $('#YourTableId').DataTable( {
        "paging":   false,
        "info":     false
    } );
} );

The above script should work, if you are using jQuery datatable verion 1.10 and above

If you are using older version, you can use the script as

$(document).ready(function() {
    $('#YourTableId').dataTable( {
        "bPaginate": false,       
        "bInfo": false
       
    } );
} );
1
At:- 4/18/2018 6:15:05 PM Updated at:- 4/18/2018 6:19:32 PM


profileImage Answered by:- neena

You can try the below code for older datatable pagination

$('#example').dataTable({
    "sPaginationType": "bootstrap", // full_numbers
    "iDisplayLength": 10,
    "bPaginate": false, //hide pagination
    "bFilter": false, //hide Search bar
    "bInfo": false, // hide showing entries
})

For newer Datatable version

$('#example').dataTable( {
    "paging": false
} );

Hope it helps.

0
At:- 6/6/2021 2:22:36 PM






Login/Register to answer
Or
Register directly by posting answer/details

Full Name *

Email *




By posting your answer you agree on privacy policy & terms of use

Subscribe Now

Subscribe to our weekly Newsletter & Keep getting latest article/questions in your inbox weekly