Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-12-2008, 11:03 AM
Member
 
Join Date: Jun 2008
Posts: 23
itmani2020 is on a distinguished road
Regd the scrollbar in a table in JSP
Hi,
I m working in Report generating assignment.
I want to display a table in a jsp page and i am ablr to do it.
when the data exceeds window size means i want to use one scroll bar that too i am comfortable.
The problem i m facing is when i m scroll using the scrollbar my table header also scrolling . i want that table header should be locked and the data in the table should be scroll.

Can any one give some inputs to overcome this issue ie my table header should be be stable ther it self when i m scrolling the table...


Thanks in advance,
Mani
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-12-2008, 01:07 PM
Member
 
Join Date: Aug 2008
Posts: 22
mtv134 is on a distinguished road
please provide the source of your jsp
__________________
visit
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Muhammad Safwat
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-13-2008, 03:24 PM
Member
 
Join Date: Jun 2008
Posts: 23
itmani2020 is on a distinguished road
Hi i go it....
<style type="text/css">
.ScrollTable-container {
display:table-cell;
}
.ScrollTable thead tr {
position: relative;
}
.ScrollTable tbody {
overflow: auto;
}
.ScrollTable tbody tr {
height: auto;
}
.ScrollTable tbody tr td:last-child {
padding-right: 20px;
}</style>

-------------------------------------------------------

<div class="ScrollTable-container">
<div class="ScrollTable" style="height: 200px;">
<table>
<thead>
<tr><th colspan="2">Heading</th></tr>
<tr><th>Column 1</th><th>Column 2</th></tr>
</thead>
<tbody style="height: 135px;">
<tr>
<td align="left">Label1</td>
<td align="left">Data1</td>
</tr>
<tr>
<td align="left">Label2</td>
<td align="left">Data2</td>
</tr>
</tbody>
</table>
</div>
</div>
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-13-2008, 03:25 PM
Member
 
Join Date: Jun 2008
Posts: 23
itmani2020 is on a distinguished road
With reference to previous post
Hi guys,
With the help of above code i got my table header is fixed durind scroll by scrollbar of the table....
Thanks,
Mani
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 08-13-2008, 03:26 PM
Member
 
Join Date: Jun 2008
Posts: 23
itmani2020 is on a distinguished road
Thanks
Thanks Muhammad
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get Integer from table adeeb AWT / Swing 1 06-10-2008 01:56 PM
Help Regd MyEclipse worldcup2k7 Eclipse 0 05-22-2008 09:08 PM
AWT Table Scrolling albert_kam AWT / Swing 0 01-03-2008 01:37 PM
Using java.awt.Scrollbar Java Tip Java Tips 0 01-03-2008 11:19 AM
Table Help CoOlbOyCoOl NetBeans 1 05-06-2007 06:19 PM


All times are GMT +3. The time now is 09:11 AM.


VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org