wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes Horizontal scrolling with fixed columns Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Horizontal scrolling with fixed columns" Watch "Horizontal scrolling with fixed columns" New topic
Author

Horizontal scrolling with fixed columns

Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
Hi, I have a table with 10 columns and thousands of rows. When scroll horizontally, the first two columns should stay as it is, the remaining column should scroll (like Excel).

Please let me know some ready made components; or solution got custom code.


“Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ”<br>
-Martin Fowler
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
A few thousand rows will be an issue with any script that does this because of performance.

I do not know of any free scripts that do it [or do it well]

Eric
Venkat Sadasivam
Ranch Hand

Joined: May 10, 2008
Posts: 139
Eric, sorry for not being clear on my requirement.

My requirement is to support fixed columns in horizontal scrolling. For example in excel we can fix the first two columns, during horizontal scrolling except the first two columns remaining columns will scroll.

To support thousands of rows we have pagination in place.

Thanks,
Venkat
Bas Cost Budde
Greenhorn

Joined: Nov 29, 2008
Posts: 1
div.scroll-fixcol { float: left; }
div.scroll-body { width: 90%; overflow: auto; }
.scroll td { height: 1.5em; max-height: 1.5em;}
.scroll-body td { text-align: right; padding-right: 0.2em; }

create a table with the fixed columns, put it in a div class="scroll scroll-fixcol";
create a table with the rest of the data, put it in a div class="scroll scroll-body"
 
GeeCON Prague 2014
 
subject: Horizontal scrolling with fixed columns