I have My DataTable column width defined like this (i'm using angular 7)
private dtOption: any = {
"paging": true,
"ordering": true,
"info": true,
"searching": false,
"pageLength": 20,
"order": [[2, "asc"]],
"language": {
"sUrl": "//cdn.datatables.net/plug-ins/9dcbecd42ad/i18n/Spanish.json"
},
"autoWidth": false,
"columnDefs": [
{ 'max-width': '3%', 'targets': 0 },
{ 'max-width': '3%', 'targets': 1 },
{ 'max-width': '15%', 'targets': 2 },
{ 'max-width': '5%', 'targets': 3 },
{ 'max-width': '10%', 'targets': 4 },
{ 'max-width': '10%', 'targets': 5 },
{ 'max-width': '10%', 'targets': 6 },
{ 'max-width': '3%', 'targets': 7 },
{ 'max-width': '10%', 'targets': 8 },
{ 'max-width': '3%', 'targets': 9 },
{ 'max-width': '10%', 'targets': 10 },
{ 'max-width': '10%', 'targets': 11 },
{ 'max-width': '3%', 'targets': 12 },
{ 'max-width': '4%', 'targets': 13 }
]
};
but many times I've have trying to fix my columns but it is imposible
My data table has 12 columns. These columns are set with the auto width to "true"; I think it is relatively small. and it shouldn't show problems, but set autowidth to FALSE But continue set de column whit out change