I want to assign width to the datatable columns.. How to do that?
I want to assign width to the datatable columns.. How to do that?
laxmipark
Posts: 22Questions: 8Answers: 0
I have tried with Columns as well as columnDefs .. it doesn't seem to be working.
I have 13 columns, do I have to specify the width for each of them?
"columnDefs": [
{ "orderDataType": "dom-input", "className": "dt-center", "targets": [9], "type": "string" },
{
"targets": [13],
"visible": false
},
{ "width": "50px", "targets": 0 }
],
This discussion has been closed.
Answers
columns.width
is the way to assign width to a column. If that isn't working for you, please link to a page showing the issue so we can help debug it.Allan
IT didn't work because I had autowidth: true at the start
That shouldn't stop
columns.width
being able to assign a width to certain columns. If you do have a link to the page showing the issue I can take a look.Thanks,
Allan