[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread Andy Matthews

Use Excel?

:) 

-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Matt Wilson
Sent: Wednesday, April 08, 2009 9:53 AM
To: jQuery (English)
Subject: [jQuery] How can I freeze the title row in a table?


I have a table with lots of rows, and when I scroll down, I can't see the
row with the column titles.

How can I freeze that row in place so I can still see it as I scroll down?




[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread Liam Potter


I remember seeing a plugin that did this, can't remember what it was 
called though.
Basically, what that plugin did. was if it detected the thead scroll out 
of view, it would place a copy of it in the DOM in it's own div, set to 
position:fixed.


This way you emulate the table scrolling down, but the titles staying in 
place.


Andy Matthews wrote:

Use Excel?

:) 


-Original Message-
From: jquery-en@googlegroups.com [mailto:jquery...@googlegroups.com] On
Behalf Of Matt Wilson
Sent: Wednesday, April 08, 2009 9:53 AM
To: jQuery (English)
Subject: [jQuery] How can I freeze the title row in a table?


I have a table with lots of rows, and when I scroll down, I can't see the
row with the column titles.

How can I freeze that row in place so I can still see it as I scroll down?


  


[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread Jonathan Vanherpe (T T NV)


Matt Wilson wrote:

I have a table with lots of rows, and when I scroll down, I can't see
the row with the column titles.

How can I freeze that row in place so I can still see it as I scroll
down?

I don't think you can, unless there's a way of using position:fixed on 
table rows (but it would really surprise me if that worked, especially 
crossbrowser).


If the width of the columns is fixed, you could also use 2 tables. One 
with the top row and position:fixed, and the other with the real data.


Or you'd have to somehow construct a faux table with divs and stuff, but 
I doubt that's worth the trouble.


Jonathan

--
Jonathan Vanherpe - Tallieu  Tallieu NV - jonat...@tnt.be


[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread JohnZ

http://www.webtoolkit.info/scrollable-html-table.html


On Apr 8, 9:53 am, Matt Wilson m...@tplus1.com wrote:
 I have a table with lots of rows, and when I scroll down, I can't see
 the row with the column titles.

 How can I freeze that row in place so I can still see it as I scroll
 down?


[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread aquaone
There are hacks but none that work well cross-browser without additional
hacks. Some plugins use the two table solution, some don't use tables at all
and replace them with divs.
Have you considered using pagination instead of a fixed thead hack?

aquaone

On Wed, Apr 8, 2009 at 07:53, Matt Wilson m...@tplus1.com wrote:


 I have a table with lots of rows, and when I scroll down, I can't see
 the row with the column titles.

 How can I freeze that row in place so I can still see it as I scroll
 down?



[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread Liam Potter


that's a pretty cool script.

JohnZ wrote:

http://www.webtoolkit.info/scrollable-html-table.html


On Apr 8, 9:53 am, Matt Wilson m...@tplus1.com wrote:
  

I have a table with lots of rows, and when I scroll down, I can't see
the row with the column titles.

How can I freeze that row in place so I can still see it as I scroll
down?



[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread Matt Kruse

On Apr 8, 9:53 am, Matt Wilson m...@tplus1.com wrote:
 I have a table with lots of rows, and when I scroll down, I can't see
 the row with the column titles.
 How can I freeze that row in place so I can still see it as I scroll
 down?

There isn't a good solution that will work across all browsers, IMO.

Since I only needed a solution for this in IE, I created this, which
has frozen footers and columns, too:

http://www.javascripttoolbox.com/lib/scrollingdatagrid/

and another approach, which works well for long tables on a page that
you don't want to have inside a scrolling window:

http://www.javascripttoolbox.com/lib/floatingheader/

Hope that helps,

Matt Kruse


[jQuery] Re: How can I freeze the title row in a table?

2009-04-08 Thread jlcox

Drupal has a standard script to do this, see
http://drupal.org/project/issues/date?status=All
for instance. You might be able to pick apart the source code to adapt
it to your needs.