Datatables Editor with Child Rows
Datatables Editor with Child Rows
jbronikowski
Posts: 7Questions: 4Answers: 0
Has anyone ever used the child rows with the editor. If so, does anyone have any code
This discussion has been closed.
Replies
It should basically be a case of merging the code from that example with that from the Editor example that you want to use. Have you tried that? If so, what did you come up with?
Allan
I'm not sure I follow this, I would like the same thing as well. In the code for the child rows, you deliberately create a new table template dynamically in javascript, which you then inject. This is only readable.
What if I need ways to edit or update the functionality? Would you suggest that I have to create textbox fields then? How would I save or update the values? I would prefer if I can open a popup of only the fields in the child row, as I would with the parent row.
Also, is there a way where I wouldn't need to create table template in javascript? Can I just create an html file with handlebars (like angular), and just inject it from the file?
Hi Dan,
Is the inner table you want to modify part of the parent row's data (like in the child row example) or do you have a one-to-many relationship?
For the former, there are two options:
If you are using a one-to-many relationship, you could use the approach detailed in this blog post just moving the child table into the child row, rather than in its own container.
Allan