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.
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.