문제

I have a table and I want to resize the column of the table

$("#tableSortable").dataTable({
        "bAutoWidth": false,
        "aoColumns": [
        { sWidth: '1%' },
        { sWidth: '1%' },
        { sWidth: '1%' },
        { sWidth: '1%' } ]
    });
    tableSortable.fnDraw();
});
도움이 되었습니까?

해결책

Well in comments Rory McCrossan mentioned . Yes the combined cells of table should be 100%

Well in your case there are 4 columns right then its pretty straight farword .

"aoColumns": [
        { sWidth: '25%' },
        { sWidth: '25%' },
        { sWidth: '25%' },
        { sWidth: '25%' } ]

And if you want to do it in a different way you can set bAutoWidth:True .

Regards

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top