Problem with horizontal scrolling mixed with infinite Y scrolling.

Problem with horizontal scrolling mixed with infinite Y scrolling.

UPEngineerUPEngineer Posts: 93Questions: 0Answers: 1
edited May 2011 in Bug reports
Hello all,

Seem to be having a bit of a problem getting these two working together.

Here is what I have.

I have a table that has horizontal scrolling for a couple of columns.

I also have it set to infinite scrolling on the vertical.

Here is the relevant code for this:

[code]
"bScrollInfinite": true,
"bScrollCollapse": true,
"sScrollY": '400px',
"sScrollX": "100%",
"sScrollXInner": "110%",
[/code]

However, when the page first loads, the vertical scrollbar is missing. I have to use the horizontal scrollbar to move to right and when I do, then the vertical scrollbar then displays and works correctly.

I don't know if I have a CSS wrong or if the DT code itself is conflicting somewhere.

I have my table set at 400px. However when it initializes it is set at 218px according to firebug. Once I use the horizontal scrollbar the value changes to the correct 400px. I can't figure out why it is doing this.

Any help or suggestions?

Thanks,
Scott

Replies

  • UPEngineerUPEngineer Posts: 93Questions: 0Answers: 1
    As a followup, if I set the height of my table using css to 400px, the vertical scrollbar displays but all the table cells are huge.

    However, if I use either scrollbar, the cells flatten out to the normal height and everything appears normal.

    It appears at first glance the DT table height calculation to enable vertical scrollbar while using infinite vertical scrolling is inserting the wrong height maybe?

    I am at a loss and can't figure out why or where the height on inital page load is coming from.

    Thanks,
    Scott
  • allanallan Posts: 61,864Questions: 1Answers: 10,136 Site admin
    Hi Scott,

    Sounds very odd indeed - I'm away from my own computer at the moment so I can't try to reproduce this right now, but from your description I'm afraid I can't put my finger on what might be happening... I'll have a look later on.

    One thing that I would say, is I've been working on a new plug-in recently which is basically virtual scrolling for DataTables - infinite scrolling on steroids... It might(?) address the issue. You could checkout out from github ( https://github.com/DataTables/Scroller ) and see what you think (there are examples in there showing how it works). It should hopefully be released fairly soon, when I write up the documentation for it.

    Allan
  • MickaMicka Posts: 2Questions: 0Answers: 0
    edited August 2011
    Hello allan and UPEngineer,

    First, congrats allan for this amazing component.

    Second, UPEngineer, did you succeed to resolve the problem of the infinite scrollbar because I'm with the same problem than you.

    At the initialisation of the datatable, the infinite vertical scrollbar is not drawing. I have to move the horizontal scrollbar to make the horizontal appear.

    This is the configuration that I'm using:

    [code]"bScrollInfinite": true,
    "bScrollCollapse": true,
    "sScrollY": "300px",
    "sScrollX": "100%",
    "sScrollXInner": "150%"[/code]

    Thanks for your answer.

    Micka
  • allanallan Posts: 61,864Questions: 1Answers: 10,136 Site admin
    Try increasing the display length on initialisation: http://datatables.net/ref#iDisplayLength

    Allan
This discussion has been closed.