I am new in jQuery. I have used Datatables in grid but need not pagination.
There is a list of orders in one page and I show them in a Datatable grid but in bottom I do not want to show pagination. Is there any way to remove or hide pagination from the data table by using a bit customization on the jQuery library.
I tried to customize it but I found very few methods to do it..
Thanks in advance.
$(document). ready(function () { $('#example'). DataTable({ paging: false, ordering: false, info: false, }); });
DataTables can split the rows in tables into individual pages, which is an efficient method of showing a large number of records in a small space. The end user is provided with controls to request the display of different data as the navigate through the data.
You should include "bPaginate": false,
into the configuration object you pass to your constructor parameters. As seen here: http://datatables.net/release-datatables/examples/basic_init/filter_only.html
For DataTables 1.9
Use bPaginate
option to disable pagination.
$('#example').dataTable({
"bPaginate": false
});
For DataTables 1.10+
Use paging
option to disable pagination.
$('#example').dataTable({
"paging": false
});
See this jsFiddle for code and demonstration.
For DataTables 1.9
Use sDom
option to configure which control elements appear on the page.
$('#example').dataTable({
"sDom": "lfrti"
});
For DataTables 1.10+
Use dom
option to configure which control elements appear on the page.
$('#example').dataTable({
"dom": "lfrti"
});
See this jsFiddle for code and demonstration.
It's working
Try below code
$('#example').dataTable({
"bProcessing": true,
"sAutoWidth": false,
"bDestroy":true,
"sPaginationType": "bootstrap", // full_numbers
"iDisplayStart ": 10,
"iDisplayLength": 10,
"bPaginate": false, //hide pagination
"bFilter": false, //hide Search bar
"bInfo": false, // hide showing entries
})
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With