How to change rows to child rows?
How to change rows to child rows?
Hello everyone. Sorry to ask something for sure is simple, but i'm new here with datatables.net (top component, btw).
This is the situation:
In the table initialization, table is empty.
After submiting a form, I am updating the table with ajax.
All rows come from a php/mysql query in a json format.
Now I need to verify the data and set some rows a child rows.
Example:
row1
row2
row3
-> child row
-> child row
-> child row
row4
row5
-> child row
-> child row
row6
...
How can I do this?
Thanks in advance.
This question has an accepted answers - jump to answer
Answers
Hi @JLDR ,
This example here shows how to create child rows, so that's one component ticked. The other thing you'll need to do is to decide when to draw the child rows, you could probably do this as either part of the
rowCallback
orcreatedRow
,Cheers,
Colin
Thanks, colin.
I've not yet done it, but I think that will do the job.
I'm still getting familiar with datatables.net.
Cheers from Portugal.