Having only a single Child Row open at a time

Having only a single Child Row open at a time

rwkiiirwkiii Posts: 13Questions: 5Answers: 0

We would like to have only a single Child Row open at any one time, so if a user were to click to open a child row what jQuery would I need to execute to close any other open Child Row? I'm pretty sure this will go in the on.click event or in the format() routine that gets called, but I'm not sure of the exact line of code.

Also, given that there could only be a single Child Row open at any given time, I would want to avoid searching the entire list so we can cut down on processing requirements. It should suffice to search only until an open Child Row is found and then stop? Unless of course, there are no other Child Rows open and then it would search them all to make sure.

Or... is there an option that can be set that on DataTables that allows only one Child Row to be open at a time? I couldn't find such an option.

Thanks!

This discussion has been closed.