Toggle bootstrap data tables on and off

Toggle bootstrap data tables on and off

darrendarren Posts: 4Questions: 0Answers: 0
edited March 2013 in DataTables 1.9
I need to load a datatable with dynamically data which can be:

1.) Shown / hidden on toggle
2.) Have a series of nested tables which load data from a source : creating a cascading table ( data from one table loads another)
For example : one table loads dynamic team data, when clicked on a team row it displays a second table which members in that team.

I know it's a bit vague, i'm totally new to datatables so any help advice great appreciated

Replies

  • GregPGregP Posts: 487Questions: 8Answers: 0
    It can all be done.

    Toggling can work a bunch of different ways, and targeting the element to hide/show is equally varied. It just boils down to:

    [code]
    // in the document ready function, ideally
    $('#someButton').on('click', function() {
    $('#someContainer').toggle();
    });
    [/code]

    Loading up a nested table isn't any different than loading the original top-level table. Where you will need to do some research and provide descriptions is in where and how the table should appear. (For example, "Click a team name, the row opens up and a table of players appears").

    The code isn't super-difficult, but it takes a bit of time and effort so the best thing to do is give it your best shot and post your efforts.
This discussion has been closed.