DataTables search function include expandable rows content

DataTables search function include expandable rows content

M__M__ Posts: 5Questions: 0Answers: 0
edited September 2013 in DataTables 1.9
In this example (http://datatables.net/examples/api/row_details.html), showing a data tables with expandable rows, the expanded content is not included in the search functionality. The content is fetched on demand when a user clicks to expand the row, so the detailed content is not in the actual data table from start.

In this other example (http://jsfiddle.net/SBdJd/11/), where the row grouping plugin has been used, all data is in the table from the start, and is also included in the search functionality. However, the row grouping functionality don't really apply to the more complex table structure in the first example. The first example has several columns and values, and the explanded functionality could be of any HTML-format.

Is there a way to keep the structure of example 1, but still get the search functionality to include the expandable content like in example 2 ?

Many thanks for a great plugin

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,470 Site admin
    You could just put the content that you want searchable into a hidden column. That's probably how the row grouping plug-in works (but its 3rd party, so I'm not sure).

    Allan
  • M__M__ Posts: 5Questions: 0Answers: 0
    Thanks Allan! That's a simple solution, but I still didn't think about it.. Thanks for helping out :)
This discussion has been closed.