DataTables: Plugin or Example for Searchable Hidden Rows and Expand All Button?
DataTables: Plugin or Example for Searchable Hidden Rows and Expand All Button?

I'm interested in using the row expansion feature in DataTables (as shown in this example). However, I've encountered a few limitations:
1) Search doesn't include data in collapsed rows — so hidden content isn't searchable. If there is a way to search data in collapsed rows, can the row expand automictically for search results.
2) No built-in "Expand All / Collapse All" toggle — which would be useful for users who want to view all row details at once.
Are there any DataTables plugins or examples that solve these issues?
This question has an accepted answers - jump to answer
Answers
The example has this data for all the rows.
The child row shows the
name
andextn
objects. To searchextn
, for example, define it in a hidden column like this:See the second example from this thread.. You can update the code to make the button a toggle button and show/hide the child rows based on the state of the button.
Use the same code in the
search
event. Usepage.info()
to determine if there are filtered records. If there are then show the child rows, if not then hide them.I would make a function to show/hide the rows with a parameter to determine which to do. Call that function in the above events with the appropriate parameter.
Kevin
Thankyou!