Issue with scroll X,Y

Issue with scroll X,Y

toson1003toson1003 Posts: 11Questions: 3Answers: 0

I'm using datatable
But columns are deviation when set scrollX,Y
Please help me
Here is my test case
live.datatables.net/fovamiro/5/edit

Thanks all

Answers

  • allanallan Posts: 61,740Questions: 1Answers: 10,111 Site admin
        // It returns 3 elements instead of 1 !
        var tables = document.getElementsByClassName('display');
    

    That is correct and expected. In order to get the table body to scroll without also scrolling the `-tag thead, the table is broken into three individual tables. The header, body and if there is one the footer. Javascript is then used to try an alignment.

    You have the column with the long string Donna Snider3333333333444444444444444444444444555555555555555555666666666666 set to be 10% width, which obviously isn't going to work, hence the misalignment.

    If you let DataTables calculate the widths for you, it does work: http://live.datatables.net/fovamiro/9/edit .

    Allan

This discussion has been closed.