Search for Hidden Child rows (show extra / detailed information)

Search for Hidden Child rows (show extra / detailed information)

dinesh87dinesh87 Posts: 2Questions: 1Answers: 0

I am not able to search in Child rows (show extra / detailed information) datatables
please help

This question has an accepted answers - jump to answer

Answers

  • colincolin Posts: 15,143Questions: 1Answers: 2,586

    Hi @dinesh87 ,

    There's a few threads on this - see here and here for example,

    Cheers,

    Colin

  • kthorngrenkthorngren Posts: 20,292Questions: 26Answers: 4,768
    Answer ✓

    The child rows are not apart for the data set Datatables searches. You will need to code this. Here is an example:
    http://live.datatables.net/begujizo/1/edit

    The example assumes that the data to be search is part of the original data set returned in the ajax response. In this case its an array of data where only two of the elements in the array are shown in the table and two others are used in the child rows. It relies on the draw to process the child rows. It uses filter() and rows().indexes() to get the row indexes that match the search criteria. For efficiency it uses the selector-modifier of {page: 'current'} to process only those rows being displayed. This can be removed to process all rows if desired.

    Kevin

  • dinesh87dinesh87 Posts: 2Questions: 1Answers: 0

    Thanks a lot @kthorngren

This discussion has been closed.