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 have tried to customize it but I found very few methods for do it..
Thanks in advance.
if you want to remove pagination and but want ordering of dataTable then add this script at the end of your page!
Try this code
Here is an alternative that is an incremental improvement on several other answers. Assuming settings.aLengthMenu is not multi-dimensional (it can be when DataTables has row lengths and labels) and the data will not change after page load (for simple DOM-loaded DataTables), this function can be inserted to eliminate paging. It hides several paging-related classes.
Perhaps more robust would be setting paging to false inside the function below, however I don't see an API call for that off-hand.
i have solved my problem using it, hope it works for u..
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.htmlDISABLE PAGINATION
For DataTables 1.9
Use
bPaginate
option to disable pagination.For DataTables 1.10+
Use
paging
option to disable pagination.See this jsFiddle for code and demonstration.
REMOVE PAGINATION CONTROL AND LEAVE PAGINATION ENABLED
For DataTables 1.9
Use
sDom
option to configure which control elements appear on the page.For DataTables 1.10+
Use
dom
option to configure which control elements appear on the page.See this jsFiddle for code and demonstration.