Solved

Tables with fixed columns

Posted on 1998-10-06
18
307 Views
Last Modified: 2010-04-09
How do I create a Fixed Column using a Table?I need
the fixed Column to contain some key field, which can
always be viewed while scrolling through the other
columns.  
0
Comment
Question by:anupdn
  • 5
  • 4
  • 2
  • +7
18 Comments
 
LVL 28

Expert Comment

by:sybe
ID: 1838425
use a frame
0
 
LVL 4

Expert Comment

by:martinag
ID: 1838426
sybe, You need to post that as an answer :-)

Martin
0
 

Author Comment

by:anupdn
ID: 1838427
If I do add frames How can I maintain a link between the tables in both the frames, so as to scroll vertically. I mean if at all there are more then screen ful of rows, I need to scroll vertically which means both my frames/tables should be in sync.
How do I do this?This is in fact one thing I had tried out, but it fails when I want to scroll vertically!!!
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 4

Expert Comment

by:jbrugman
ID: 1838428
Then use layers, that affect each other when nesesary. be ware, this only works in NN>=4 and IE>=4.
0
 
LVL 5

Expert Comment

by:j_powers
ID: 1838429
Frames can be done, but what you are asking is very integrated. DHTML will offer some solutions, but you will not be able to see this stuff in other browsers.

I have a friend that had another ingenious idea that worked pretty good. This was for an intranet site, so I don't have an address, if that page is still being used.

He created a picture that would become the background image on the chart. The Table was placed around that picture. He gave it a great effect by watermarking the background.

So If you need a 'fixed column, you have some options. Just remember, the cooler the option, the more complicated it is...
0
 
LVL 1

Expert Comment

by:development
ID: 1838430
I may not have got the question correctly but all you wanted to know is how to make a column in a table fixed?  Why not just use fixed width as opposed to variable % widths.
0
 

Expert Comment

by:kookoo
ID: 1838431
use Perl can help you. Every output can be control by fixed format, very easy.



0
 
LVL 12

Expert Comment

by:Otta
ID: 1838432
DEVELOPMENT, the way I read ANUPDN's question is that he/she
has data like:
 Beatles: John, Paul, George, Ringo
 Stones: Mick, Keith
and wants output in a table like:

Beatles  John
Beatles  Paul
Beatles  George
Beatles  Ringo
Stones   Mick
Stones   Keith

i.e., the first column changes "slowly",
while the second column changes for every row.

A background-image won't help.
The generated HTML will have to "distribute" the data
over the appropriate rows.
0
 
LVL 1

Expert Comment

by:ivancho
ID: 1838433
The only way for this to work with ALL browsers and not only IE4/or NN4 is to split your table.
Be aware that while there is no problem in scrolling VERTICALLY it is considered VERY ANNOYING for a user to scroll HORIZONTALLY.
Just split your table and put the freezed column/s first- there is no other way.
Sorry.
0
 

Author Comment

by:anupdn
ID: 1838434
I have already tried this solution, which I had already commented on.It is indeed a problem scrolling horizontally.I am sorry that I have to reject this solution.
I want a generic solution, which can work in Netscape and in IE.

0
 
LVL 2

Accepted Solution

by:
johnny99 earned 20 total points
ID: 1838435
anupdn, I'm sorry to have to tell you, I don't think anyone understands your question, which is why you keep getting unsatisfactory answers.

Please tell us what you want in more detail, with examples.

*My* interpretation of what you want is that you want the "fixed" column to contain some sort of generic information like:

Name:    
Address:
Number:  

and the other columns to contain the details of a number of different records, for instance

Name:    Fred
Address: Elm Street
Number:  555-1234


And in some way you want to be able to scroll one record (3 lines) at a time, i.e. you want to be able to scroll in one click from the above to:

Name:    Bob
Address: Oak Street
Number:  555-4321

(This is the effect you can get in Excel by splitting the screen, for instance)

If that's what you want, then we can all go home, because it's simply not possible. Tables don't scroll, only windows and frames scroll, and you can't control the scrolling of frames in any way that will force the name to line up against "Name:" and the address to line up against "Address:" etc.

The only way to achieve this effect would be having each person's record as a separate HTML document.  Then rather than scrolling, you could link each record to the next and make the new record load into the frame when you went from Fred to Bob. I can't see any other way.
0
 
LVL 12

Expert Comment

by:Otta
ID: 1838436
JOHNNY99 wrote:
> I don't think anyone understands your question,

Did you read the comment by OTTA ?
It was quite similar to your understanding of ANUPDN's question.
0
 
LVL 2

Expert Comment

by:johnny99
ID: 1838437
Yes, Otta, I did read it, but I think my interpretation is different enough to be worth posting, but I think the important thing is that anupdn spells out exactly what he or she wants -- so many of the questions on Experts-Exchange are like this: "I want to do [blah]", but they don't know how to put blah into words... I guess if they did, then they wouldn't have to ask...
0
 

Author Comment

by:anupdn
ID: 1838438
johnny99,
I am sorry to tell you this, but I think you making a big mess of very shraight forward question.
I will try to give you more examples.
Suppose I have 15 columns in a table.The first Column contains the description field.Now it's quite obvious that when you talking of 15 columns, you cannot view all the 15 columns in one shot on the screen.
Now here's the catch. Suppose I want to view the 15th column, I would scoll vertically to the column, which means that my first column is no more visible to me !
Thats why when I scroll to the 15th column , I need to see the first column, which means I have to keep the first column as fixed.

If you have ever worked in VB, you must have observed how the Microsoft Grid works when you say that you want a row as fixed !

Hope this is a better way to present my problem.I know that it cannot be done in one single Table.There should be an alternate way of doing this.A round about way of doing it.

I nearly solved it when I used frames.But it's a pain when the person has to scroll horzontally.

Thanks
0
 
LVL 2

Expert Comment

by:johnny99
ID: 1838439
Er, well, you've accepted my answer, so I guess it's over.
What you described is basically what I guessed you meant, but still I don't understand what you mean.

"Column" to me means a vertical series of items. Therefore if you have fifteen columns, you would have to scroll horizontally to go to from 1 to 15. You're either confused between column and row or you're confused between horizontal and vertical!

I have no intention of ever working in VB, nor do I know or care what Microsoft Grid might be. : )

Two things:

* "it's quite obvious that when you talking of 15 columns, you cannot view all the 15 columns in one shot on the screen" er, not to me, because it depends on the size of the screen and the width of the columns

* you seem to be hung up on the idea that a user shouldn't have to scroll horizontally -- I don't think it's a problem, and if it is, why don't you just reorient your table so that they scroll vertically?

As an HTML question, this one has been answered long ago. How can you create a table with a fixed column? You can't.
0
 

Author Comment

by:anupdn
ID: 1838440
Dear johnny99,
I know very well that tables can't have fixed columns.But there are lot more things which are not directly possible in HTML.But still there are ways and means to make it happen.

I am sorry that I made a mistake when saying that that 'to view the 15th column we have to scroll vertically' it should have been
'horizontally'.

Finally I never told you to work in VB and for the matter know what's a Microsoft grid is !!!I just wanted  to know if you had previously worked in VB, so as to give you a better perspective!

I am also sorry to tell you that no one has given me a right soultion.I will surely post the solution once I come across one!!!


Anyhow thanks for your 'response'.
0
 
LVL 2

Expert Comment

by:johnny99
ID: 1838441
Are we having a fight now?

I think you're mistaken. You've already got the answer. The thing you want to do is going to be done with frames or not at all, so you should give someone the points -- I'm not saying it should be me, I don't care, but you're making assumptions about HTML that are causing you to waste lots of time. You're mapping ideas about other languages and protocols onto HTML and they just don't fit.

  >  I know very well that tables can't have fixed columns.

Er, not when you first asked the question.

  >  But there are lot more things which are not directly
  >  possible in HTML

No idea what you mean. A thing is either possible in HTML or it isn't.

  >  But still there are ways and means to make it happen.

Good luck!
0
 

Author Comment

by:anupdn
ID: 1838442
johnny99
I am Sorry, I am not fighting anyone nor I intend to do so. I just wanted a solution which, (let me put it this way) can solve this problem 'logically', if not 'directly', just like you and others correctly figured out the usage of frames or by splitting the table.These are not direct ways, I mean these are some of the 'creative' approaches for this problem, which too, I am afraid, has loopholes !
> but you're making assumptions about HTML that are causing you to waste lots of time

Thanks for your advise. In fact I did waste some time on this, but it was very important for me then.

Cheers
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
html5 auto send email 7 27
Alignment is not working correctly. 8 38
Wrapper for APPs 9 76
Input box width 6 26
This article discusses how to create an extensible mechanism for linked drop downs.
Find out what you should include to make the best professional email signature for your organization.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

773 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