Open all the hidden rows

Open all the hidden rows

poutchyoukpoutchyouk Posts: 17Questions: 0Answers: 0
edited June 2013 in General
Hello,

I am using this feature : http://www.datatables.net/release-datatables/examples/api/row_details.html
I want to open all my hidden rows at once.
I have a loop that goes throught all my rows.
And I'd like to wait until the current row is open before oppening the next one.

Is there a way to do so ? I only managed to do some anoying infinite loops.
Thanks.

Replies

  • msfansmsfans Posts: 1Questions: 0Answers: 0
    Use

    [code]
    var nNodes = oTable.fnGetNodes( );
    var length = nNodes.length;

    for (var i = 0; i < length; i++) {
    var nTr = nNodes[i];

    if ( !oTable.fnIsOpen(nTr) )
    {
    var nDetailsRow = oTable.fnOpen( nTr, fnFormatDetails(oTable, nTr), 'details' );
    $('div.innerDetails', nDetailsRow).slideDown();
    }

    }
    [/code]
This discussion has been closed.