How to center image in column Datables BootStrap

Viewed 1045

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 ?

1 Answers
Related