How to search Row Details

How to search Row Details

Rothrock42Rothrock42 Posts: 2Questions: 1Answers: 0
edited January 11 in Free community support

I'm setting up a table and using the Row details to show a lot more information that is available in the visible columns. The row data and the details data are coming from REST calls and are available when the table is presented to users -- no additional calls or anything fancy when the details row is displayed.

I've also got the search set up and it is working, but my users need to be able to search the contents of the details row as well. I would like to integrate that into the basic search -- that is I would prefer not to create another search mechanism.

Is there a way out of the box to include all the row data in the search?

One thought I had was adding a hidden searchable column to the table. There are about 15 to 20 different pieces of data in the details display so that could get messy.

Any other ideas how to do this?

This question has an accepted answers - jump to answer


  • colincolin Posts: 3,280Questions: 0Answers: 584

    This thread should help, it's asking the same thing.



  • Rothrock42Rothrock42 Posts: 2Questions: 1Answers: 0

    Thanks for the suggestion colin. That seems related, but not quite the same thing. That is about a column search using information from another column.

    I'm trying to do the complete table search to include child detail rows.

    There are a couple of things I'm stumbling over in finding a way to generalize that solution to my problem.

    One thing about that solution is it makes the column search **only ** look in a different column. In that example the other column included the same information as the original column and additional information. In my case I've got multiple data that are all different and the original column doesn't include them.

    Is there a way to join the values from two (or more) columns? That is "search for the value in this column OR that column"? And then how I could expand that (easily) to 15 or more hidden columns?

  • allanallan Posts: 48,657Questions: 1Answers: 7,068 Site admin
    Answer ✓


    Colin is correct, that thread describes the approach that can be taken to search child row content. The key thing it know here is that (currently) DataTables can only search data that is in a column. It can be a hidden column, but it must be in a column. So the typical approach here is to put the child row data you want to be searchable into a hidden column. For multiple data points, you'd either concatenate the data to be searched into a single cell (using a renderer) or have one column per data point to be searchable.


Sign In or Register to comment.