473,480 Members | 2,094 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Freeze Table Headers.

Hello all.

There is what i would like to do, I have a page that pulls all the
hours for our staff over a given period calculated them and reports
back on 15 different colums and is aproximatly 500 individual rows of
data for a table. Now as you could imagine that is a night mare to look
at for anyone, i have done a few things to make remeber which columns
are which however a simple Solution would be to the top row, or rows i
define stay constantly at the top as your scroll down.

This is classic ASP and not ASP.NET, I can find alot of resources for
ASP.NET but nothing for ASP.

I have considered Frames, but who really wants to mess around with that
ad there are alot of controls at the top of the page that manipulate
the data.

Also i have heard of using JavaScript or CSS, Has anyone achieved this
before?

I am not sure if you need my code or not as this is just classic table
design

Thanks In Advance

May 23 '06 #1
13 11165

Nico VanHaaster wrote:
Hello all.

There is what i would like to do, I have a page that pulls all the
hours for our staff over a given period calculated them and reports
back on 15 different colums and is aproximatly 500 individual rows of
data for a table. Now as you could imagine that is a night mare to look
at for anyone, i have done a few things to make remeber which columns
are which however a simple Solution would be to the top row, or rows i
define stay constantly at the top as your scroll down.

This is classic ASP and not ASP.NET, I can find alot of resources for
ASP.NET but nothing for ASP.

I have considered Frames, but who really wants to mess around with that
ad there are alot of controls at the top of the page that manipulate
the data.

Also i have heard of using JavaScript or CSS, Has anyone achieved this
before?


Personally, I would consider paginating the results, but if you really
want to present 500 rows on a page then you could have a look at
http://underscorebleach.net/jotsheet...ith-css-layout
which uses css to apply a framelike appearance. Apparently this
doesn't work in all browsers, so you might want to google about a bit.
If you are intent on a client-side solution (frames/javascript/css) you
would be better off taking your question to a more appropriate group.

--
Mike Brind

May 24 '06 #2
Nico VanHaaster wrote on 24 mei 2006 in
microsoft.public.inetserver.asp.general:
Hello all.

There is what i would like to do, I have a page that pulls all the
hours for our staff over a given period calculated them and reports
back on 15 different colums and is aproximatly 500 individual rows of
data for a table. Now as you could imagine that is a night mare to look
at for anyone, i have done a few things to make remeber which columns
are which however a simple Solution would be to the top row, or rows i
define stay constantly at the top as your scroll down.

This is classic ASP and not ASP.NET, I can find alot of resources for
ASP.NET but nothing for ASP.

I have considered Frames, but who really wants to mess around with that
ad there are alot of controls at the top of the page that manipulate
the data.

Also i have heard of using JavaScript or CSS, Has anyone achieved this
before?


This is not a serversode/ASP solution you are after,
so realy off-topic here.
Please continue on a clientside html or css NG

==========

Give the top row a seperate <table> and have the content rows
in a table with a fixed height, so that a scrollbar will develop if the
table row number exeeds the set height.
Specify each td width:??px; correctly and use table-layout:fixed; for these
tables.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 24 '06 #3
Hi Nico,

Here is code for you.. Just modify it and its your.

<table border="1" width=500 cellpadding=0 cellspacing=0>
<tr>
<td width="25%">First</td>
<td width="25%">Second</td>
<td width="25%">Third</td>
<td width="25%">Fourth</td>
</tr>
<tr>
<td colspan="4">
<div style="position: absolute;height:227px;overflow:auto;">
<table width="500" border="1" ID="Table1" cellpadding=0
cellspacing=0>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
</table>
</div>
</td>
</tr>
</table>

May 27 '06 #4

"vicky" <vi*********@yahoo.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.com...
Hi Nico,

Here is code for you.. Just modify it and its your.

<table border="1" width=500 cellpadding=0 cellspacing=0>
<tr>
<td width="25%">First</td>
<td width="25%">Second</td>
<td width="25%">Third</td>
<td width="25%">Fourth</td>
</tr>
<tr>
<td colspan="4">
<div style="position: absolute;height:227px;overflow:auto;">
<table width="500" border="1" ID="Table1" cellpadding=0
cellspacing=0>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td width="25%">1</td>
<td width="25%">2</td>
<td width="25%">3</td>
<td width="25%">4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
</table>
</div>
</td>
</tr>
</table>


This simple example appears to work but will fail in the real world because
the column widths in the 'header' table may well not match the column widths
in the 'body' table.

May 29 '06 #5
Anthony Jones wrote on 29 mei 2006 in
microsoft.public.inetserver.asp.general:
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
</table>
</div>
</td>
</tr>
</table>


This simple example appears to work but will fail in the real world
because the column widths in the 'header' table may well not match the
column widths in the 'body' table.


use:

table.t {table-layout:fixed;}

However I till fail to see the ASP-significance.

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 29 '06 #6

"Evertjan." <ex**************@interxnl.net> wrote in message
news:Xn********************@194.109.133.242...
Anthony Jones wrote on 29 mei 2006 in
microsoft.public.inetserver.asp.general:
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
</table>
</div>
</td>
</tr>
</table>
This simple example appears to work but will fail in the real world
because the column widths in the 'header' table may well not match the
column widths in the 'body' table.


use:

table.t {table-layout:fixed;}


Yes the solution you've already given is the only reliable one I've found so
far.
However I till fail to see the ASP-significance.
Yes you've said that already. If I were a computer I would probably just
ignore the message or throw an error. However as a human I can see how
someone could think that the question was relevant (even though there are
even better matches for the question).

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)

May 29 '06 #7
Hi,
There will not be any problem, Just use this logic in loop to create
columns dynamically, and as the width's I have used in %, so will be
adjusted automatically.

May 30 '06 #8
vicky wrote on 30 mei 2006 in microsoft.public.inetserver.asp.general:
There will not be any problem, Just use this logic in loop to create
columns dynamically, and as the width's I have used in %, so will be
adjusted automatically.


Please quote what you are replying to.

If you want to post a followup via groups.google.com, don't use the
"Reply" link at the bottom of the article. Click on "show options" at the
top of the article, then click on the "Reply" at the bottom of the article
headers. <http://www.safalra.com/special/googlegroupsreply/>

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
May 31 '06 #9

"vicky" <vi*********@yahoo.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
Hi,
There will not be any problem, Just use this logic in loop to create
columns dynamically, and as the width's I have used in %, so will be
adjusted automatically.


I'm not sure what it is that 'will not be a problem'. Fundamentally though
the column widths of 25% in your first header table and the 25% column
widths in second data table do not strictly have to be the same actual width
when resolved to pixels. Indeed with a pixel border your solution is
already slightly misalligned.


May 31 '06 #10
Anthony Jones wrote:
"vicky" <vi*********@yahoo.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
Hi,
There will not be any problem, Just use this logic in loop to create
columns dynamically, and as the width's I have used in %, so will be
adjusted automatically.


I'm not sure what it is that 'will not be a problem'. Fundamentally
though the column widths of 25% in your first header table and the
25% column widths in second data table do not strictly have to be the
same actual width when resolved to pixels. Indeed with a pixel
border your solution is already slightly misalligned.


Not to mention what happens when the scrollbar appears ...
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
May 31 '06 #11
Ok, send me your code and I will get it work for u.
Anthony Jones wrote:
"vicky" <vi*********@yahoo.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
Hi,
There will not be any problem, Just use this logic in loop to create
columns dynamically, and as the width's I have used in %, so will be
adjusted automatically.


I'm not sure what it is that 'will not be a problem'. Fundamentally though
the column widths of 25% in your first header table and the 25% column
widths in second data table do not strictly have to be the same actual width
when resolved to pixels. Indeed with a pixel border your solution is
already slightly misalligned.


Jun 1 '06 #12
We weren't saying we couldn't do it ... just that it was not as easy as
you made it sound.

vicky wrote:
Ok, send me your code and I will get it work for u.
Anthony Jones wrote:
"vicky" <vi*********@yahoo.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
Hi,
There will not be any problem, Just use this logic in loop to create
columns dynamically, and as the width's I have used in %, so will be
adjusted automatically.


I'm not sure what it is that 'will not be a problem'. Fundamentally
though the column widths of 25% in your first header table and the
25% column widths in second data table do not strictly have to be
the same actual width when resolved to pixels. Indeed with a pixel
border your solution is already slightly misalligned.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
Jun 1 '06 #13
Hey, I was just trying to help, if my language made some
misunderstanding, then I am sorry.

Bob Barrows [MVP] wrote:
We weren't saying we couldn't do it ... just that it was not as easy as
you made it sound.

vicky wrote:
Ok, send me your code and I will get it work for u.
Anthony Jones wrote:
"vicky" <vi*********@yahoo.com> wrote in message
news:11*********************@u72g2000cwu.googlegro ups.com...
Hi,
There will not be any problem, Just use this logic in loop to create
columns dynamically, and as the width's I have used in %, so will be
adjusted automatically.
I'm not sure what it is that 'will not be a problem'. Fundamentally
though the column widths of 25% in your first header table and the
25% column widths in second data table do not strictly have to be
the same actual width when resolved to pixels. Indeed with a pixel
border your solution is already slightly misalligned.


--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.


Jun 4 '06 #14

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
24050
by: Matt Kruse | last post by:
This is a common requirement - "freeze panes" in a table, so that some header rows and some columns on the left are frozen while the body content scrolls. This makes large tables more usable on...
5
1644
by: Ben | last post by:
Is there any way to freeze the DataGrid headers so that the headers are always viewable while srolling down? Thanks in advance, Ben!
0
1288
by: Jack | last post by:
I am displaying the contents of a dataset to my customer as an excel spreadsheet and giving them the opportunity to save the spreadsheet to their local machine. The spreadsheet has approx 650...
7
2930
by: srinivas | last post by:
Hi, I am a asp programmer.I am displaying the db records in the html pages in a web page.I have 500 columns and 1000 rows in that html table.Here i am planning to implement the "MS-Excel Freeze...
4
13830
by: Roger Withnell | last post by:
I would like to freeze column and row headings on a webpage, simulating freeze panes as in an Excel spreadsheet. Don't seem to be able to do it with Frames. Is there a way with Javascript...
1
3162
by: jmalone | last post by:
I have a python script that I need to freeze on AIX 5.1 (customer has AIX and does not want to install Python). The python script is pretty simple (the only things it imports are sys and socket)....
6
2493
by: dmj07 | last post by:
Hi All, Like in Excel with freeze panes, I was wondering is it possible to freeze a HTML table at the top of a page so it is visible as you scroll down the page? Example table code: <table...
2
3360
by: Seth Williams | last post by:
Is there a way to mimic the behavior in Excel, for a Gridview, to freeze the column headers/titles, so that they show, as you scroll down the gridview?
5
4897
by: jrod11 | last post by:
hi, I found a jquery html table sorting code i have implemented. I am trying to figure out how to edit how many colums there are, but every time i remove code that I think controls how many colums...
0
7051
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6915
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7054
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
4794
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4493
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3003
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
2993
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1307
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
567
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.