Disregard Headers in Pagination
Disregard Headers in Pagination
marshall1969
Posts: 3Questions: 1Answers: 0
I have tables that use multiple headers. So, in the pagination they get counted as an entry — instead of 1 of 3 entries I get 1 of 4 entries because my second header is getting counted as a data row. How can I have the pagination sequence ignore this?
Answers
Here is the HTML, I don't want my month headers calculated when showing pagination numbers. The TR class "month" is a pseudo header and is getting tabulated when figuring the number of rows being viewed.
Datatables sees those rows as table rows, not header rows, as they are in the
tbody
.RowGroup might be a good option, like this example. You will need to change your table to remove the "header" row. For example:
http://live.datatables.net/jakuhiki/1/edit
The example uses
rowGroup.dataSrc
as a function to allow for converting the date,1/13/2023
for example, to the month name.Kevin
THANKS! That works perfectly