How to make Datatable pagination to neglect hidden rows?

How to make Datatable pagination to neglect hidden rows?

dvnlglsdvnlgls Posts: 5Questions: 0Answers: 0
edited February 2013 in DataTables 1.9
I have a table with some hidden rows. Now, when I use jQuery datatable plugin with bootstrap pagination, it takes into account all the rows. Say if I have 100 rows (50 hidden) and display 10 rows per page, currently there will be 10 pages while the desired result is to have only 5 pages. Any help would be greatly appreciated.

Demo at http://live.datatables.net/osezur/2/edit#javascript,html

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    edited February 2013
    This is not currently possible in DataTables - all rows are treated equally. If you want rows removed front h table, you should use DataTables' filtering controls to filter those rows out rather than setting display:none.

    Allan
  • dvnlglsdvnlgls Posts: 5Questions: 0Answers: 0
    thanks, this is what i wanted to know.
This discussion has been closed.