With Datables BootStrap, to cnter img in column I do this
$('#despatchEntryDetails').dataTable({
"responsive": true,
"autoWidth": false,
"columns": [
{ "title": "Numéro" },
{ "title": "Date création" },
{ "title": "Sujet" },
{ "title": "Etat" },
{ "title": " ",
"width": "32px",
"orderable": false,
"data": null,
"className": "dt-body-center",
"defaultContent": '<input name="submit" id="viewDetail" type="image" src="btn_vuedetail.gif" onclick="viewDetail();" />',
}
],
data: dataSet
});
});
Expected this to center image in the last column but it don't seem to be working.
Ref: DataTables Cell classes options
Any ideas ?