To add a CSS class to the last column of each row, I use the following method:
var dataTablesOptions = {
'columnDefs': [
{ targets: -1, className: 'text-center' }
],
// ...
};
$('#minhaTabela').DataTable( dataTablesOptions );
The problem is that after running any action whose data comes from the server, the last <td/>
loses the CSS class.