WordPress.org

Ready to get started?Download WordPress

Forums

WP-Table Reloaded
[resolved] collapse/expand rows (10 posts)

  1. trumpeter
    Member
    Posted 2 years ago #

    Hi

    Thank to Tobias for creating this great plugin, it works very nicely and I am hoping to use it in my site.

    I am using a complicated table with a large number of columns. I would like to simplify this information by having each row 'expand' when the user clicks on it to reveal further information. Here is an example of what I mean:

    http://www.jankoatwarpspeed.com/examples/expandable-rows/

    Is there any way to add this function into the plugin?

    Thanks you.

    http://wordpress.org/extend/plugins/wp-table-reloaded/

  2. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    yes, that should be no problem.

    I suggest that you follow the instructions at http://www.jankoatwarpspeed.com/post/2009/07/20/Expand-table-rows-with-jQuery-jExpand-plugin.aspx to add this to the table.

    In this setup, you can basically regard WP-Table Reloaded as the source of the HTML code of the table. To create the colspan that holds the details, you would use the "colspan" button below the table text input fields.

    Then just load the script into the page and adjust it accordingly. You might also need to load some CSS code. To include this only on pages with the table, I suggest the HiFi plugin (http://wordpress.org/extend/plugins/hifi/) which allows adding content to the header and footer.

    Regards,
    Tobias

  3. trumpeter
    Member
    Posted 2 years ago #

    Thanks Tobias.

    It looks like the jQuery plugin uses a row beneath the main row to expand/collapse. Will the table still be sortable?

  4. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    yes. that seems to be how it is done. There's a row for the visible text and then a row for the details.

    Unfortunately, due to the colspan, the table will no longer be sortable though, as the DataTables JavaScript library (which does the sorting) does not support colspanned cells :-(

    Regards,
    Tobias

  5. trumpeter
    Member
    Posted 2 years ago #

    Oh that's a shame :( I really need to keep the sortable option.

    Do you know if there is any other way to present additional info while maintaining the table as sortable?

  6. TobiasBg
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    I have seen something like this with the DataTables library as well, but I can't find it right now :-( I know that it was on the DataTables website (www.datatables.net), so I suggest that you look around there.

    Regards,
    Tobias

  7. dev@intervisionit.nl
    Member
    Posted 1 year ago #

  8. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    no, that was not it. But fortunately I found what I meant 8 months ago (I think :-) ):
    http://www.datatables.net/release-datatables/examples/api/row_details.html

    Regards,
    Tobias

  9. pete911
    Member
    Posted 1 year ago #

    Hi thank you for your amazing plugin and the good documentaion.

    I want to implement the table from from the example
    http://www.datatables.net/release-datatables/examples/api/row_details.html
    but i have no clue how to do this.
    I had a look into your documentation but it didnt help me :(

    If a donation motivates you to help me i wont hestitate ;)

  10. TobiasBg
    Member
    Plugin Author

    Posted 1 year ago #

    Hi,

    thanks for the offer, but unfortunately, I'm not available for such professional custom work at the moment, due to severe time constraints. Sorry and thanks for your understanding.

    All I can suggest here is what I wrote above: You could try to load this into the page manually with the Hifi plugin.

    Regards,
    Tobias

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic