[feature request] hide/show specified row

[feature request] hide/show specified row

moflemofle Posts: 11Questions: 0Answers: 0
edited August 2010 in General
I now you can hack the fnFilter to show and hide rows based on something.

What would be nice is to be able to hide and show rows with something like this:

// input: index OR array of indexes, [optional] show / hide to force.
fnToggleRow(1)
fnToggleRow([1,4,6,8,9])
fnToggleRow(1,show)
fnToggleRow(1,hide)

I can actually do this myself by hiding rows using CSS, the problem is that it doesn't work when I for example search the rows, the CSS hidden rows is still hidden, even though they match the search query.

Any thoughts, Allan?

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    It's an interesting idea. As you say, show / hide rows at the moment is entirely done by filtering. It would be possible to use custom filtering to do this ( http://datatables.net/development/filtering#row_filters ), or, an API function as you suggest which will add and remove indexes from the aiDisplay and aiDisplayMaster arrays...

    Allan
This discussion has been closed.