Datatable with fixed width, but no header/footer scrolling.

Datatable with fixed width, but no header/footer scrolling.

mjesussfmjesussf Posts: 1Questions: 0Answers: 0
edited October 2014 in Free community support

Hi, I had a problem with DT, on tables without paging (so, sScrollY), with fixed width.
The thing is that I wanted the table to fit on a container that is resizing contanstly. (Maybe responsive concept apply).
So, if the table fit on the container, there is no problem.
Columns width are set with a %. ("aoColumns-"sWidth")

But if not, (too much columns, or large columns, or theres isn't the min. space), I wanted to scroll over the table (scrollX), That works fine, but only on table content, but if you set the sScrollX value, you'll scroll always.

Header and Footer don't scroll while I'm scrolling over the body.
I've been looking the forum with no answer on this topic.

I think that this entry is related:
https://datatables.net/forums/discussion/7508/fixed-header-scrolling-problem

So I wanted to share my solution with you.

Test it, resizing the window, and playing with the frames.
I solved it (kind of):
http://live.datatables.net/mubihovo/1/

Not working:
http://live.datatables.net/yesecoja/2/

This discussion has been closed.