Changing width of Columns

Changing width of Columns

NeiculNeicul Posts: 6Questions: 3Answers: 0

I am trying to change the width of some of my columns.
Even when i define the size in ColumnDefs, it simply doesn't change.

Here's my code:

var table = $("#mainTable").DataTable({
        deferRender: true,
        paging: false,
        stateSave: true,
        scrollX: true,
        scrollY: "100%",
        autoWidth: false,
        fixedColumns: {
            leftColumns: 1,
            rightColumns: 2
        },
        "columnDefs": [
            { "width": "10px", "targets": 0 }
        ],
        //Get data by Ajax-call to mainTableData.php
        ajax: {
            url: "data/mainTableData.php",
            type: "POST"
        }
        ]
This discussion has been closed.