How to associate two rows to get them back when searching
How to associate two rows to get them back when searching
Hi, I'm creating a table with DataTables to display all the data concerning the risks of a project. My table looks like :
| risk Owner | Costs | Probability | Starting date | Ending date |
+-------------+-------+-------------+---------------+-------------+
| The name of my first risk taking the whole line |
+-------------+-------+-------------+---------------+-------------+
| B. Wayne | 1000 | 40% | 01-01-2016 | 01-09-2016 |
+-------------+-------+-------------+---------------+-------------+
| The name of my second risk taking the whole line too |
+-------------+-------+-------------+---------------+-------------+
| Superman | 600 | 20% | 01-06-2016 | 01-12-2016 |
+-------------+-------+-------------+---------------+-------------+
I didn't list all the data shown in the table but the view looks like I described it, the risk name containing also a link to a page for the modification of the data.
Everything's working great, the sort and the search work perfectly. However, the problem with the search is that it only shows the line containing the specified string so i'm only getting the risk name or its data, never the two at the same time, which is what it want.
I think that there's a possibility to "associate" the rows to get at each time the risk name and its data, not only the name or the data.
This fiddle (jsfiddle.net/q7VL3/) represents the result I'm looking for, actually, i'm looking for for the same functionality but for the research.
Thanks
Answers
I finally found what I was looking for in the documentation, I post it if someone has the same issue one day : https://www.datatables.net/examples/advanced_init/row_grouping.html