bug with DataTables v1.7.1 Columns's width

bug with DataTables v1.7.1 Columns's width

thesmallcarthesmallcar Posts: 3Questions: 0Answers: 0
edited August 2010 in Bug reports
Good eveing :)

When I make 3 Columns, and I hide Column 2.
Then Column 2's width is in effect, it have effect Column 3!

At last thanks for your work! It's great!

Replies

  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I'm not sure I quite follow - could you perhaps post an example please?

    Allan
  • thesmallcarthesmallcar Posts: 3Questions: 0Answers: 0
    ..........
    /* id */ { "bVisible": false, "bSearchable": false,"bSortable": false,"aTargets": [ 0 ]},
    ..........




    id<!-- be hidden -->
    title
    name






    I try like this, then the column id 's width is using for column title.
    My English is not good, hope you can understand:)

    at last I cancel the line 2722 and 2757(ver 1.7.1 code is //nTh.style.width = oSettings.aoColumns[i].sWidth; The tow lines are same).
    now I can define the width like this:



    id
    title
    name
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    I've just tried the following and it seems to be working okay (i.e. column 2 is getting a bit more width than column 3, at roughly 57% width):

    [code]
    $(document).ready(function() {
    $('#example').dataTable({
    "aoColumnDefs": [
    { "bVisible": false, "bSearchable": false,"bSortable": false,"aTargets": [ 0 ]}
    ]
    });
    } );
    [/code]
    [code]



    1
    2
    3




    1
    2
    3



    [/code]
    Perhaps you could link us to an example which is showing this problem please?

    Thanks,
    Allan
This discussion has been closed.