Not count hidden rows on pagination

Not count hidden rows on pagination

TropicalistaTropicalista Posts: 6Questions: 0Answers: 0
edited September 2012 in General
Hi,

I have a datatable that shows one hidden row for each visible row. Example:


row_1
hiddenrow_1
row_2
hiddenrow_2
row_3
hiddenrow_3
row_4
hiddenrow_4
row_5
hiddenrow_5
row_6
hiddenrow_6

I have a total of 12 rows, but only 6 are visible. It's possible to set pagination count only visible rows? so in this case I should have only one page...

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    No - this is not possible in DataTables by default. Either you need to inject the rows dynamically using fnDrawCallback (which is messy), or I would suggest looking at the fnOpen API method. However, the basic idea is that DataTables currently does not identify hidden rows - all rows are processed equally.

    Allan
  • TropicalistaTropicalista Posts: 6Questions: 0Answers: 0
    Thanks
This discussion has been closed.