Quantcast
Channel: Recent Discussions — DataTables forums
Viewing all articles
Browse latest Browse all 82115

can hidden row toggle column be something OTHER than column 0?

$
0
0
The example here: http://www.datatables.net/release-datatables/examples/api/row_details.html, gives a great example of how to add a toggle column that, when the toggle image is clicked on a particular row, a hidden row below that is then shown with additional data. GREAT FEATURE. The example shows the column created as becoming column 0.

I have 8 columns in my table and I want the toggle image to be in column 5. Was thinking it would be as simple as revising the "childNodes[0] in the code below to childNodes[4], but that seems to cause problems. Is it able to be done in the current version of DataTables? If so, can an example be provided like that on the page referenced above?

..................
$('#classlist thead tr').each( function () {
this.insertBefore( nCloneTh, this.childNodes[0] );
} );

$('#classlist tbody tr').each( function () {
this.insertBefore( nCloneTd.cloneNode( true ), this.childNodes[0] );
} );
..................

Thanks.

Viewing all articles
Browse latest Browse all 82115

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>