Solved

Jave web component that can display data from a database, (like .NET's DataGrid) that can lock the first column so when you scroll right all the columns scroll but the first.

Posted on 2004-08-25
12
188 Views
Last Modified: 2010-03-31
Java web component that can display data from a database, (like .NET's DataGrid) that can lock the first column so when you scroll right all the columns scroll but the first.

For example. Column 1 has name and the rest of the columns are data about a person so when you scrool to the right you would want the name column to stay in view to the user while they look at the other data.

I am looking for a solution for jsp and javascript.

Code examples are welcomed.
0
Comment
Question by:gillgates
  • 6
  • 3
  • 3
12 Comments
 
LVL 15

Expert Comment

by:Javatm
ID: 11898679
Hi Friend;

Think this is what you need, An example of creating a table from a database in JSP :
http://webdesign.ittoolbox.com/groups/groups.asp?v=java-l&i=529362

Hope that helps . . .
Javatm
0
 
LVL 3

Author Comment

by:gillgates
ID: 11898694
Hello,

I don't think that is what I am looking for... I want an object that has its own scroll bars and not the pages.  So you scroll with the object and the first column (or whatever column I say) doesn't move but the other do.

0
 
LVL 15

Expert Comment

by:Javatm
ID: 11898716
Sorry that one was bogus . . .

Accessing Database through JSP :
http://java.sun.com/developer/qow/archive/73/index.html

Here is the correct one. An example of creating a table using servlets :
http://www.stardeveloper.com:8080/articles/display.html?article=2001062501&page=1

Here is another helpfull J2EE Tutorial :
http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html

Hope that helps . . .
Javatm
0
 
LVL 3

Author Comment

by:gillgates
ID: 11899194
I already know hot to access a database in java.  I am asking for the existance of an object that has its own scroll bars and not the pages.  So you scroll with the object and the first column (or whatever column I say) doesn't move but the other do.
0
 
LVL 3

Author Comment

by:gillgates
ID: 11909886
Anyone understand what I am talking about?  I am increasing the point value.  150 -> 500
0
 
LVL 18

Accepted Solution

by:
armoghan earned 500 total points
ID: 11921288
I dont think that kind of DataGrid is present as a Java Web Component.
You may find a good DataGrid type of component if you are using an Applet.

But i dont think that there is any good component which can be added in your JSP pages
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 3

Author Comment

by:gillgates
ID: 11933199
armoghan

So if I used a java applet instead of jsp or javascript you think there would be a component?  You don't happen to know what component would do what I am asking?
0
 
LVL 15

Expert Comment

by:Javatm
ID: 11938044
> So if I used a java applet instead of jsp or javascript you think there would be a component?
A component that you can use for applet would be JTable.
0
 
LVL 3

Author Comment

by:gillgates
ID: 11938071
I checked http://publib.boulder.ibm.com/infocenter/wsphelp/index.jsp?topic=/com.sun.api.doc/javax/swing/JTable.html and didn't see anything that would allow me to lock a column so it wouldn't scroll.
0
 
LVL 18

Assisted Solution

by:armoghan
armoghan earned 500 total points
ID: 11938385
Actually Scrolling is the property of JScrollPane.
if a table is placed inside the JScrollPane, then it gives the scrolling. So you cannot keep one columns of the Table not scrolling and others scrolling.
But you may be able to simulate it by using Two Tables. One over the other. One with scrolling and other without scrolling.
What you can do is when you press lock any column, create a table with that column only on the fly and place it exectly over the main tables's respective column, Now you will be able to scroll other columns, but not this one.

Hope it helps
0
 
LVL 18

Expert Comment

by:armoghan
ID: 11938396
0
 
LVL 3

Author Comment

by:gillgates
ID: 11969280
I guess you can't do this... I will have to use two jtables...

Thanks for the help.
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now