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
190 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
Best Practices: Disaster Recovery Testing

Besides backup, any IT division should have a disaster recovery plan. You will find a few tips below relating to the development of such a plan and to what issues one should pay special attention in the course of backup planning.

 
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

Optimizing Cloud Backup for Low Bandwidth

With cloud storage prices going down a growing number of SMBs start to use it for backup storage. Unfortunately, business data volume rarely fits the average Internet speed. This article provides an overview of main Internet speed challenges and reveals backup best practices.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
login jsp example 24 51
Java exception bubble up 2 18
throw exception 21 44
Java: How do I open the default windows program for a given file type 3 29
After being asked a question last year, I went into one of my moods where I did some research and code just for the fun and learning of it all.  Subsequently, from this journey, I put together this article on "Range Searching Using Visual Basic.NET …
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
Viewers learn about the “while” loop and how to utilize it correctly in Java. Additionally, viewers begin exploring how to include conditional statements within a while loop and avoid an endless loop. Define While Loop: Basic Example: Explanatio…
The viewer will learn how to implement Singleton Design Pattern in Java.

821 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