How to search rows in both tbody and tfoot

How to search rows in both tbody and tfoot

bhambham Posts: 1Questions: 1Answers: 0

Basically I have a simple DataTable with the search filter. I have some rows in the tbody which are filtered by the value input into the search box. I have more rows in the table footer that I want to be able to filter the exact same way. Here is my example, http://live.datatables.net/watitaho/1/ so in that case you would be able to type "jackson" into the search box and get one row in the body and one row in the foot.

Answers

  • kthorngrenkthorngren Posts: 20,269Questions: 26Answers: 4,765

    My suggestion would be to create a search function, similar to what you see in this example:
    https://datatables.net/examples/api/regex.html

    In the function you can perform either a global or column based search. You would need to add your own code to search the data in the footer and apply the filters. Datatables doesn't have builtin functionality to search the footer.

    Kevin

This discussion has been closed.