Search within child rows using parent table's searchbuilder

Search within child rows using parent table's searchbuilder

sumanthchsumanthch Posts: 2Questions: 1Answers: 0
edited October 2022 in Free community support

Hi,

I am currently using datatable with searchbuilder integration and would like to use the same container for searching within child rows too. Currently, the child rows functionality and search builder funtionality are working fine individually but I would like to show data from child rows into the searchable dropdowns as both parent and child rows will have the same columns. Is this possible?

Thanks,
Sumanth

Answers

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Hi Sumanth,

    The only way to really do this is to have the data that would be shown in the child rows as hidden columns in the DataTable. Then SearchBuilder would still see the column data, but the end user would need to drill into the row to get it.

    Allan

  • sumanthchsumanthch Posts: 2Questions: 1Answers: 0

    Hi Allan,

    Thanks for the quick response. We have around 20 columns in the table already and there can be zero or multiple child rows for any given row in the datatable. So Adding them to a hidden column in the parent datatable doesn't seem like an option as I would have to concatenate 20 columns of data from multiple rows into a single column.

    Also if we use this hidden column approach, can the search builder filter the data based on main column? I believe the user would need to add a condition on hidden column with operator as 'Contains'. Please correct me if I am wrong.

    Thanks,
    Sumanth

  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Hi Sumanth,

    You are correct. With n levels of child rows, SearchBuilder probably isn't going to be much help for you I'm afraid as it wasn't designed for that use case.

    Allan

Sign In or Register to comment.