Trouble with sScrollY

Trouble with sScrollY

WGroleauWGroleau Posts: 2Questions: 0Answers: 0
edited February 2012 in General
Have a DataTable in a div

Desired:
1. div to have a max-height H
2. If DataTable has enough rows to reach max-height, should scroll vertically the rows but not the header.
3. If DataTables has fewer rows, should not scroll and div should shrink to fit.

If I make sScrollY fixed S, e.g., 28em or 250px, and div has height H (not max-height, and SH, then DataTable scrolls like I want if it has enough rows, but when it doesn't, there is all the empty space in the div.

If I make sScrollY relative ( % ), and div has max_height, then div always has scrollbar instead of DataTable. Which means rows and headers both scroll, headers disappearing off top edge of div.

Tried several combinations, but never got better than any of that (and in one combination, it was worse: div and DataTable each had their own scroll bar).

Replies

  • allanallan Posts: 63,540Questions: 1Answers: 10,476 Site admin
    Set the bScrollCollapse parameter to make sScrollY a max-height.

    Allan
  • WGroleauWGroleau Posts: 2Questions: 0Answers: 0
    I had already tried that. with or without, the containing div gets a scroll bar unless I set things up to have empty space
This discussion has been closed.