fnFilter table row with class name?

fnFilter table row with class name?

user1user1 Posts: 1Questions: 0Answers: 0
edited July 2009 in General
Hi, I want to filter table rows that have a class name of 'details'. I looked through the api and noticed the fnFilter. Can I filter the rows? and if so how can I do this. I tried editing the fnFilter but I don't know what to put in for the string since I'm pretty new to jquery.

thanks.

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Hi user1,

    fnFilter is used on the 'innerHTML' of the table cells, so you don't immediately have access to the TR class name. However, it would be possible to use a custom filtering plug-in (see for example: http://datatables.net/1.5-beta/examples/api/range_filtering.html ) to do example what you are looking for (it's yet to be added to the documentation since 1.5 is in beta - but hopefully not for much longer!).

    Hope this helps!

    Allan
  • benekastahbenekastah Posts: 3Questions: 0Answers: 0
    Allan: That link is dead. I need to write this plugin, and would appreciate being able to look through that plugin as an example. Is there a way you could point me to the source? Thanks.
  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    Yup that link is from a (very) old beta release. On the examples page there is a link to "Range filtering / custom filtering": http://datatables.net/release-datatables/examples/plug-ins/range_filtering.html which is what you want.

    Allan
This discussion has been closed.