Hello,
I've a table for which I'm using DataTable.
This table has input fields inside each row. This is the current view of the table without DataTable:
However, when DataTable is added:
@section scripts{
<script>
$(document).ready(function () {
$("#contadores").DataTable({
stateSave: true
});
});
</script>
}
The table resizes becoming wider:
I would like to know how to resize this columns. I've tried with this: https://datatables.net/reference/option/columns.width
@section scripts{
<script>
$(document).ready(function () {
$("#contadores").DataTable({
stateSave: true,
"columnDefs": [
{ "width": "20%", "targets": 4 }
]
});
});
</script>
}
But there are no changes.
Thanks!