Open all the hidden rows
Open all the hidden rows
poutchyouk
Posts: 17Questions: 0Answers: 0
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.
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.
This discussion has been closed.
Replies
[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]