Customizing child rows with wordpress

Customizing child rows with wordpress

lampamplampamp Posts: 8Questions: 3Answers: 1

Hello,

I'm using the inline-google-spreadsheet-viewer plugin for wordpress to display tables and customize them using datatables, but I'm quite confused with some small points. The inline viewer plugin documentation says that I can use the datatables api but gives only one simple sorting example here: https://wordpress.org/plugins/inline-google-spreadsheet-viewer/faq/

Now my table is normally adding columns exceeding the width as child rows. What I want to do is to add custom child rows (below these excess ones) for each entry just like the ones shown here https://datatables.net/examples/api/row_details.html
e.g. for each entry I want an additional child row with the any sample string

I'm not good at all with jquery, but after struggling with this looks like all I have to do is to is to have/edit the child row "format" function just like the one in the link above, right?

Where do I do that? Should I add a custom js to be loaded? How do I make the child rows follow my own format rules if I am gonna place them in a separate file??

I'm sorry this might sound like a basic question but I've honestly tried my best over a couple of days to try an sort it out before asking here.

Thank you in advance

This question has an accepted answers - jump to answer

Answers

  • Jenifer123Jenifer123 Posts: 1Questions: 0Answers: 0

    Hello @lampamp,
    You can check this thread of WordPress https://wordpress.org/plugins/inline-google-spreadsheet-viewer/

  • lampamplampamp Posts: 8Questions: 3Answers: 1

    Read that but still doesn't explain exactly how :/

  • jamiemasonjamiemason Posts: 1Questions: 0Answers: 0

    I think the source Jenifer has suggested is sufficient to address your issue hence you must refer it. There is information related to customizing HTML tables, user guide, quick start, etc. Errors related to database are not new in WordPress but that doesn’t mean we cannot resolve it. There are numbers of plugin obtainable from net that can help you in this regard. For a general example, you can see http://www.anythingforwp.com/category/wordpress_plugins/.

  • allanallan Posts: 64,032Questions: 1Answers: 10,555 Site admin

    @lampamp - Have you managed to get the DataTables' API reference? The documentation you linked to says you can do it using something like:

    var table = jQuery('#igsv-MY_TABLE_KEY').DataTable();
    

    Allan

  • lampamplampamp Posts: 8Questions: 3Answers: 1
    Answer ✓

    Thank you for all your help, sorted out. Links were very helpful, there was a misunderstanding from my side.

    @allan - hadn't seen that, thanks :|

This discussion has been closed.