473,394 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Fixed Table Header causing slow scrolling

I have a table that I dynamically fill with data from a database for
medical companies to be able to determine if their patients meet
certain criteria. However they want a fixed header for it so they can
keep track of the criteria as they scroll since there can be upwards of
1000 or more patients in the table. The way I got this to work was to
enter the information in a table via C# by storing it in a label. This
works fine and scrolls fine without the fixed header, but when I added
the fixed header, everything slows down. There are checkboxes and
textboxes for them to enter information or check items, so maybe that
makes for the slow down with the fixed header, I'm not sure. I don't
know which code is needed to be seen in order to be helpful but I'll
post the css part I use to make the fixed header in IE (doesn't work in
Firefox) and the table part isn't really helpful since the information
is dynamic, just that I have the header always the same size and the
column widths predetermined. Otherwise it is just <tr><thor <td>
tags all within a <div>.

Thanks for any help.

div#tbl-container {
width: 100%;
height: 500px;
overflow: auto;
}

table {
width: 98.5%;
table-layout: fixed;
border-collapse: collapse;
}

thead th, thead th.locked {
position: relative;
cursor: default;
}

thead th {
top:
expression(document.getElementById("tbl-container").scrollTop-2); /*
IE5+ only */
z-index: 20;
}

thead th.locked {z-index: 30;}

td.locked, th.locked{
left:
expression(parentNode.parentNode.parentNode.parent Node.scrollLeft); /*
IE5+ only */
position: relative;
z-index: 10;
}

Jan 3 '07 #1
2 12905
if it gets too slow, i suggest using paging or even better but more
difficult is to use ajax to retrieve data as and when they scroll

<df*********@gmail.comwrote in message
news:11**********************@42g2000cwt.googlegro ups.com...
I have a table that I dynamically fill with data from a database for
medical companies to be able to determine if their patients meet
certain criteria. However they want a fixed header for it so they can
keep track of the criteria as they scroll since there can be upwards of
1000 or more patients in the table. The way I got this to work was to
enter the information in a table via C# by storing it in a label. This
works fine and scrolls fine without the fixed header, but when I added
the fixed header, everything slows down. There are checkboxes and
textboxes for them to enter information or check items, so maybe that
makes for the slow down with the fixed header, I'm not sure. I don't
know which code is needed to be seen in order to be helpful but I'll
post the css part I use to make the fixed header in IE (doesn't work in
Firefox) and the table part isn't really helpful since the information
is dynamic, just that I have the header always the same size and the
column widths predetermined. Otherwise it is just <tr><thor <td>
tags all within a <div>.

Thanks for any help.

div#tbl-container {
width: 100%;
height: 500px;
overflow: auto;
}

table {
width: 98.5%;
table-layout: fixed;
border-collapse: collapse;
}

thead th, thead th.locked {
position: relative;
cursor: default;
}

thead th {
top:
expression(document.getElementById("tbl-container").scrollTop-2); /*
IE5+ only */
z-index: 20;
}

thead th.locked {z-index: 30;}

td.locked, th.locked{
left:
expression(parentNode.parentNode.parentNode.parent Node.scrollLeft); /*
IE5+ only */
position: relative;
z-index: 10;
}

Jan 7 '07 #2
I have seen that suggestion before, but unfortunately I have no
experience in paging and all the examples I find are for datagrids,
which aren't quite what I am using. Any suggestions on how to do the
paging without using a datagrid, but rather a table, would be
appreciated.

Thanks,

Dan
toffee wrote:
if it gets too slow, i suggest using paging or even better but more
difficult is to use ajax to retrieve data as and when they scroll

<df*********@gmail.comwrote in message
news:11**********************@42g2000cwt.googlegro ups.com...
I have a table that I dynamically fill with data from a database for
medical companies to be able to determine if their patients meet
certain criteria. However they want a fixed header for it so they can
keep track of the criteria as they scroll since there can be upwards of
1000 or more patients in the table. The way I got this to work was to
enter the information in a table via C# by storing it in a label. This
works fine and scrolls fine without the fixed header, but when I added
the fixed header, everything slows down. There are checkboxes and
textboxes for them to enter information or check items, so maybe that
makes for the slow down with the fixed header, I'm not sure. I don't
know which code is needed to be seen in order to be helpful but I'll
post the css part I use to make the fixed header in IE (doesn't work in
Firefox) and the table part isn't really helpful since the information
is dynamic, just that I have the header always the same size and the
column widths predetermined. Otherwise it is just <tr><thor <td>
tags all within a <div>.

Thanks for any help.

div#tbl-container {
width: 100%;
height: 500px;
overflow: auto;
}

table {
width: 98.5%;
table-layout: fixed;
border-collapse: collapse;
}

thead th, thead th.locked {
position: relative;
cursor: default;
}

thead th {
top:
expression(document.getElementById("tbl-container").scrollTop-2); /*
IE5+ only */
z-index: 20;
}

thead th.locked {z-index: 30;}

td.locked, th.locked{
left:
expression(parentNode.parentNode.parentNode.parent Node.scrollLeft); /*
IE5+ only */
position: relative;
z-index: 10;
}
Jan 10 '07 #3

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

Similar topics

0
by: george1069 george1069 | last post by:
Hi, I'm repeating <fo-table> using loop and there is <fo-table-header> to generate a title for each of the table generated. In one of the output pages, a new table is generated near to the...
2
by: Big Slim | last post by:
I'm trying to use the OVERFLOW property to make only part of a table scrollable, but to no avail. You can split a table into two tables, with your column headers in the top table and your data...
2
by: DCC700 | last post by:
VS 2005 Converted Header causing error when publishing After converting from Visual Studio 2003 to 2005, I have had several issues with a header that is used throughout the project. The...
1
by: patelbrijeshn | last post by:
Hi , I want to display a huge table. So I want to make the table header visible on the screen even as the user scrolls the window. I am using div tag to create the floating table header. Here is...
2
by: vunet.us | last post by:
This beautiful code allows a table header to be not scrollable in IE. Since Firefox does not support this CSS method expression(...), the code does not do the desired work in Firefox or other...
4
by: NoDBExperience | last post by:
G'day guys. I would like to know if there is a way to add columns to a fixed table? Each time i go to add a column, the forms don't work and all kinds of error messages result. I think this must...
0
by: sajithamol | last post by:
I would like to have a scrollable table with fixed header.I have tried with "position:relative;" in <thead>, and it's working fine with IE. But in mozilla its not working. I am wondering if I can...
3
by: sarahaziz | last post by:
Hello guys i have a problem i wish i could find a solution i created this instant chat system works fine i created this seTimeout to retrieve data when the messages exceeded an extent slow script...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.