0
I’m using the plugin DataTables
to paginate a record in a panel. The problem is that this table has 5 columns, the last one is called action where there are 4 links (currently one below the other because of the size of the column). I would like to augment the size of this column so that it is at least 2 in each row, I would only need to increase even the column size. I currently have the following code:
$('#table-clientes').DataTable( {
"ajax": baseURL,
"deferRender": true,
"order": [[ 0, "asc" ]],
"pageLength": 300,
"columnDefs": [
{ "width": "50%", "targets":4 }
]
} );
When loading the page, the column ação
gets the size I want, but when it’s finished loading, it goes back to its tiny size. I’ve tried putting class
in columnDefs
and then on css
use width: 40% ! Port but nothing helped.
Try to set the size of the others too, I already did this once in the datatables and it only accepted when I set the size of all columns independently.
– user28595
The HTML order is correct?
– David
Yes, I even let it go actually. It wasn’t so necessary. Thank you in the same way!
– Alisson Acioli