Scroll issue

Scroll issue

techguy1988techguy1988 Posts: 27Questions: 0Answers: 0
edited March 2011 in General
Hi,

I am having a scroll issue with DataTables, when using the following code it squashes all of the columns up together and leaves two massive gaps between the search bar and the footer!? The strange thing is, when I search, it starts to look semi-normal again (still having the space footer).

http://i55.tinypic.com/dzgtjk.png

I would like to point out that every other option seems to work OK!

[code]
$('#data_table').dataTable({
"sScrollY": "200px"
});
[/code]

Replies

  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    My guess is that you are initialising the table when it is hidden (i.e. in a display:none element). This means that the browser can't calculate the sizes of the table and thus DataTables can't put the correct sizes on elements. What to do is to call http://datatables.net/api#fnAdjustColumnSizing when you show the table.

    Allan
  • techguy1988techguy1988 Posts: 27Questions: 0Answers: 0
    Hi Allan,

    When I dont use sScrollY then it's absolutely fine!

    Even when I use the fnAjustColumnSizing it doesnt re-size correctly. Not really sure what's going wrong here!

    Do I need to put a div around it or something?
  • allanallan Posts: 63,516Questions: 1Answers: 10,472 Site admin
    If you look at the Firebug console are you getting any warning messages? Can you give us a link please?

    Allan
This discussion has been closed.