How do I make use of Child rows on my tables using "Tablepress"
How do I make use of Child rows on my tables using "Tablepress"
Hello!
So I've tried to search around for it myself but with no luck unfortinately.
I'm kind of "new" so to say with coding so I don't know alot, but here comes my question.
I want to be able to add "Child rows" (not sure if that is what it's called) so I'll try to explain.
Refering to "https://datatables.net/extensions/responsive/examples/child-rows/column-control.html"
there is green circles with a cross in it, that sort of acts like a dropdown menu, that is what I want to have on my table.
If there is any way that I could "copy" the table on the link provided and just change the information in each column by hand that would work aswell, or if I could get some pointers how to implement the "Child rows" onto my table.
There is a box down below that has this that seems to be some pointers but I can't for the life of me figure out where to paste it and if that is the "whole table" so to say.
The following CSS library files are loaded for use in this example to provide the styling of the table:
https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css
https://cdn.datatables.net/responsive/2.2.3/css/responsive.dataTables.min.css
Would greatly appreciate the help!
Kind Regards John
Answers
This is a better of example for getting started with child rows:
https://datatables.net/examples/api/row_details.html
See particularly the "format" function in the js code.
Thanks for the fast response, I should probably have said that the website is wordpress and mostly built from "Elementor" so I haven't really coded anything, is that a problem? What I've gathered from this is that I should be able to "copy" the table with the Java script that you linked and modify it the way I want (might be wrong there) and do I need the https:// links or what do they do?
Since I have quite low expertice in java scripts and such, I could ask alot of questions but I'll spare you the headache trying to explain, but the questions I would appreciate answered is:
Where do I insert the Java script?
Thanks alot!
Hi @john2512 ,
This blog post may help - it's discussing how use DataTables and Editor with WordPress.
Cheers,
Colin
hello @colin
I am using a paid webhosted service from Loopia, and I have the Tablepress plugin.
I was thinking I could just throw the java script in somewhere and hopefully make it work, but that blog post made me lose abit of hope.
there is something that is called Plugin-editor in wordpress, wouldnt you be able to play around in there and make something work and find some place to insert a code?
Was hoping that the plugin would have child rows in the plugin and that you wouldnt have to be a hacker to set it up but beggers cant be choosers
Thanks,
John