Column width

Column width

LArmstrong85LArmstrong85 Posts: 21Questions: 14Answers: 0

Hello,
I have a table filled with AJAX JSON and I tried to set column width but it doesn't work.
I defined my table like this:
$('#example').dataTable(
"autoWidth": false,
"columns": [
{
"data": "InternalCode",
"width": "30%",
},
{ "data": "CustomerCode" },
{ "data": "Title" },
{ "data": "Author" },
{ "data": "LastRev" },
{ "data": "LastRevDate" },
{ "data": "RevStatus" },
{ "data": "Status" },
{ "data": "Charge" },
{ "data": "Transmittal" },
{ "data": "Receipt" },
],
});
I also tried to set width directly in td field but it doesn't work. Can you help me please?

Answers

  • LArmstrong85LArmstrong85 Posts: 21Questions: 14Answers: 0

    Hello,
    I have a table filled with AJAX JSON and I tried to set column width but it doesn't work.
    I defined my table like this:

    ```

      $('#example').dataTable(
      "autoWidth": false,
    
        "columns": [
                   {
                       "data": "InternalCode",
                       "width": "30%",
                   },
                   { "data": "CustomerCode" },
                   { "data": "Title" },
                   { "data": "Author" },
                   { "data": "LastRev" },
                   { "data": "LastRevDate" },
                   { "data": "RevStatus" },
                   { "data": "Status" },
                   { "data": "Charge" },
                   { "data": "Transmittal" },
                   { "data": "Receipt" },
        ],
     });
    

    ```

    I also tried to set width directly in td field but it doesn't work. Can you help me please?

  • LArmstrong85LArmstrong85 Posts: 21Questions: 14Answers: 0

    No one can help me?

This discussion has been closed.