DataTable column width
DataTable column width

I am trying to change the width of a particular column , specifically I want to make it smaller , but there is no way I can change the size of the column in a smaller one, only higher.
The first way I tried was using columnDefs
"columnDefs": [
{ "width": "50px", "targets": 0 }
],
and the second way
"columns": [
{ "data": "Id", "name": "Id", "autowidth": false , width : '50px' }]
both not working for setting column width smaller.
Table has a fixed width, also header contains 2 buttons but they have enough space , or at least that's what I am seeing . The column width won't go less then 168px no matter what , any advice?
Answers
Hi @Gabriel23 ,
This thread should help, it's asking the same thing.
Cheers,
Colin
I do not want to add that lines in css cause it will result in a total mess in my table
I figured out , I had an input of type text which had a default size so I changed it's size before adjusting entire table width and not it works as expected