row hide / show details
row hide / show details
Hi Allan,
Is it possible to create a button that opens all rows or close all rows ?. I have an application that uses this feature (sort of like a forum) and have been asked if all the rows can be opened so that a print out would contain the full list of messages
Many thanks in advance
Phil
Is it possible to create a button that opens all rows or close all rows ?. I have an application that uses this feature (sort of like a forum) and have been asked if all the rows can be opened so that a print out would contain the full list of messages
Many thanks in advance
Phil
This discussion has been closed.
Replies
Just looking through all the posts I see an example that may do what I need
[code]
$(oTable.fnGetNodes() ).each( function () {
$(this).click( function () {
/* deselect and close all currently open rows */
$(oTable.fnGetNodes()).each( function () {
$(this).removeClass('row_selected');
oTable.fnClose( this );
});
/* Open this row */
$(this).addClass('row_selected');
oTable.fnOpen( nTr, fnFormatDetails(nTr), 'details' );
} );
} );
[/code]
My question is how would I attach a routine like this to a 'open all' and 'close all' button
Many thanks
Phil
Have a look at my download page which does something like what you are looking for: http://datatables.net/download . Combine with Visual Event and you won't even need to 'view source': http://www.sprymedia.co.uk/article/Visual+Event :-)
Allan
That was exactly what was needed, works a dream
Many thanks
Phil