Header resizing

Header resizing

aleminioaleminio Posts: 2Questions: 0Answers: 0
edited August 2012 in General
Hey,
I've got a little issue when resizing my browser window.
I've set dataTable header to 100% so both the header and content are set to 100% of the window, but when i am resizing,
the header cells width are not being re-sized well to fit the content ones.
but when i click on a header cell to "sort", it does organize it well to fit the header with the content cells.

i've tried adding
[code]
$(document).on('resize', function (event) {
DT.fnAdjustColumnSizing();
});
[/code]

but it doesn't work, which method can i run on window re-size event to re-size the header cells to make it fit the content?

Replies

  • allanallan Posts: 63,535Questions: 1Answers: 10,475 Site admin
    [code]
    $(window).on('resize', function (event) {
    DT.fnAdjustColumnSizing();
    });
    [/code]

    Is typically what I use. If that doesn't work, please post a link to a test case showing the issue.

    Allan
This discussion has been closed.