Infinite Vertical Scroll and FixedColumns dont get along

Infinite Vertical Scroll and FixedColumns dont get along

sapansaxenasapansaxena Posts: 4Questions: 0Answers: 0
edited May 2012 in General
Hi, I have a requirement of inifinite vertical scrolling and I am implementing it using
"bFilter": options.filter,
"bPaginate": true,
"sScrollX":100%,
"sScrollXInner":110%,
"bScrollCollapse":true,
"bScrollInfinite": true,
"sScrollY": "245px",
"bAutoWidth":false.
I also have a condition of one/two fixed columns and I am implementing this using:
new FixedColumns( oTable, {
"iLeftColumns": 2,
"iLeftWidth": 350
} );

The problem is, when data keeps on loading, when scrolling down, a point comes when all the data in fixed columns gets unloaded, and never comes back until we refresh the page.

If we disable, either one of them(switch off vertical scrolling with normal scrolling),everything works fine.

Is this a bug? Or am I missing something?

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    > Is this a bug? Or am I missing something?

    More of an unimplemented feature. I'm afraid that at this time FixedColumns will not work with infinite scrolling or the Scroller plug-in.

    Allan
  • sapansaxenasapansaxena Posts: 4Questions: 0Answers: 0
    Hi Allan,
    I looked into the FixedColumns.js code and found that at var i = that.s.dt.oFeatures.bServerSide===false ?
    that.s.dt.aiDisplay[ that.s.dt._iDisplayStart+z ] : z;

    the computed value for array goes beyond maximum array size, and hence the cause of the problem.
    I know this is an unimplemented feature, but couldnt there be a workaround or something?
  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    I'm afraid not - the way infinite scrolling works, i would say is almost completely incompatible with FixedColumns - or if it does work easily then its by fluke rather than design... The two weren't designed to work hand in hand I'm afraid. I do hope to get FixedColumns working with Scroller in future (there is a patch on Github outstanding which I've still to checkout).

    Allan
  • jhaitasjhaitas Posts: 32Questions: 0Answers: 0
    @sapansaxena

    I've worked out a fix for this ... somewhat talked about at http://datatables.net/forums/discussion/9318/scroller-fixedcolumns-scrolling-inconsistency/p1

    Trying to get Allan to incorporate this patch to FixedColumns :)
This discussion has been closed.