DataTable paging issue

DataTable paging issue

avin503avin503 Posts: 1Questions: 0Answers: 0
edited September 2012 in General
I have a web page with a table that displays data from a database. There is a main being displayed and an additional that is hidden and only displays with jquery when the user clicks a button that is on the first main .

The problem that I am getting is when I use the datatables plugin, it finds all the rows and counts them, so I have 11 rows of data and 11 additional hidden rows under each main row. It then displays at the button of the table "Showing 1 to 10 of 22 entries". I don't want Datatables to count or see the hidden rows. Is there a way to fix this problem.

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Currently no - there is no built in way for DataTables to ignore rows.

    Having said that, there is a workaround - use a bit of jQuery / Javascript before the table is initialised and remove the hidden rows, then reattach them with fnDrawCallback. A bit nasty, but that's the only way to do it with DataTables at the moment.

    Allan
This discussion has been closed.