Quantcast
Channel: Free community support — DataTables forums
Viewing all articles
Browse latest Browse all 35281

Multiple FixedColumns example

$
0
0

Hi there,

I've successfully implemented a Multiple FixedColumn Data Table. Now, I want to adjust the width of the Left (the fixed columns - 2 in my case). This is what my code looks like atm:

$(document).ready(function() {
    var table = $('#articles').DataTable( {
        scrollY:        "750px",
        scrollX:        true,
        scrollCollapse: true,
        paging:         false,
        columnDefs: [
    { width: 350, targets: 1 }
  ]
    } );
    new $.fn.dataTable.FixedColumns( table, {
        leftColumns: 2
    } );
} );

I'm not even sure if targets:1 is correct, or if it has to be 2 (since I dont know if it is initialized by 0 or by 1)

However, no matter how much I change the width in columnDefs, the table doesn't change, how can i set the width of the first 2 fixed Columns??

Best regards !
b101


Viewing all articles
Browse latest Browse all 35281

Trending Articles