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
194 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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
 
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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
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…
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

751 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