Customizing the page numbers to show in pagination using jquery datatables
Customizing the page numbers to show in pagination using jquery datatables

Hi,
I am using jquery datatable and I am getting the total no of records. I just can't figure out how to set the value for page numbers. note: I am using custom pagination. Only thing I want to modify is total Pages so I can implement my own pagination. similar to this question(). but I am using 1.10.20
. Is there any possible solutionhttps://stackoverflow.com/questions/16424147/how-to-display-numbers-only-in-pagination-of-jquery-datatables
This discussion has been closed.
Replies
You can use
pagingType
set tonumbers
for that, see here.Colin
Hi colin, I am doing custom pagination. I have created events for previous and next now I am getting all values like total records, no of pages etc. Is there any way I can override these with datatable pagination like is there any way I can render my page numbers with datatable without breaking anything
If it's custom pagination, then you can do whatever you're coding it to do. We're happy to take a look, but as per the forum rules, please link to a test case - a test case that replicates the issue will ensure you'll get a quick and accurate response. Information on how to create a test case (if you aren't able to link to the page you are working on) is available here.
Cheers,
Colin
Thanks for your reply, currently I am looking to override
DataTable.ext.pager
values so I can use them to create a plugin$.fn.dataTableExt.oPagination.custom = function(page, pages)
to overridefunction _numbers(page, pages)
parameters.whats your thought on this