Column Size

Column Size

plwplw Posts: 34Questions: 13Answers: 0
         $(document).ready(function () { 
           $("#DTable").dataTable({ 
               "pageLength": 30,
               autoWidth: false,
               columnDefs: [
                    { type: 'natural-nohtml', targets: '0' },
                    { width: '200px', targets: '3'}                    
                ],
               "lengthMenu": [ 10, 25, 30, 50, 75, 100 ],
               "bFilter": false,
               "aaSorting": [[ 2, 'asc' ]],
               "aoColumns": [ 
                   { "bSortable": false },
                   { "bSortable": true },   
                   { "bSortable": true },
                   { "bSortable": true },
                   { "bSortable": true }                                          
               ]
           });
       });  

I have the above. How do I make the First and last columns smaller please, Adding { width: '20px', targets: '0'} , before { width: '200px', targets: '3'} doesnt seem to do anything. Thanks

Answers

  • plwplw Posts: 34Questions: 13Answers: 0

    It is ok - I just needed to set the width in the <td> for the headers of the columns - solved - thanks

Sign In or Register to comment.