views:

50

answers:

2

Hello,

I would need to build a html table that has a horizontally scrolable column. The scroll should be placed in the column's header.

My question first question is: do you know any jquery plug-in that is able to do this? My second question: is this possible using a single table. I've heard that in order to do this you need to use multiple synchronized tables that look like a single one from the user's perspective.

Any ideea/advice would be welcomed.

Thank you.

A: 

I've only seen something like this using jqGrid, but that was two tables (the master table has a second scrollable table within it). I'd like to know a plugin for this as well...

odavy
I've checked jqGrid, but it seems that it's used for ASP. I would like something that has nothing to do with the serverside. I myself am using django on the serverside.
Alexandru Cucu
What makes you think jqGrid has to do with ASP? jqGrid === jQuery Grid Plugin. What you mean is the post from 22.03.2010 on the mainpage which just states they released some other software which helps using jqGrid if you have ASP.NET but isn't needed at all for you
jitter
ahh, sorry... you're right
Alexandru Cucu
A: 

I would do as you suggested and use 2 containers. They'd both be set to overflow:scroll and have a set width, but the top one would simply contain a div that you can set to be the same width as your table. You can then bind to the "scroll" event in jquery, and set the scroll position of the divs to match each other in that event. Honestly I haven't tried this so I don't know how reliably that event fires, but in theory it should work.

Alternatively, you could do without the standard browser scrollbar and write your own scrollbar that uses javascript to set the position of your table in the overflow:scroll div. If you want draggable behavior (not just left/right arrows), it could be somewhat difficult, but wouldn't be impossible.