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
1
: 8392 At:- 4/18/2018 1:23:57 PM
jQuery jQuery Datatable pagination







3 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
       
    } );
} );
2
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.

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


profileImage Answered by:- jon

Disable paging in datatable using below code

$('#YoruTableId').dataTable({    
    "bInfo": false, //Dont display info example, "Showing 1 to 4 of 4 entries"
    "paging": false,//Disable paging when 'false', default true              
    "bPaginate": false,//don't want paging      
})

Thanks.

0
At:- 6/23/2022 6:53:53 AM






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