Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

locking a column

Status
Not open for further replies.

xartas

Programmer
Aug 20, 2001
26
0
0
ES
Hi!

Anyone can give me a hint on next problem?

I'm trying to have a TStringGrid or TListView locking one column. What I want is a TOAD-like behaviour. In TOAD you can lock a column in the Tables tab and then browse a table scrolling to the right and to the left all normal columns but the locked column which remains static and always visible. This is very useful when viewing all data of a complete record that is too long to fit the screen width. By locking a key column containing the primary key or whatever reference value within the record you can check other fields values and never lose track of the record they belong to.

Example

Employee ID SSecNum Salary
---------------- -------------- ----------
101 999 777

without locking all columns are scroll (to the left for instance)

SSecNum Salary Deptment
-------------- ------------ --------------
999 777 Comp

locking the Employee ID column only subsequent columns are scrolled

Employee ID Salary Deptment
---------------- -------------- ----------
101 777 Comp

Any idea to have a start point?

Thanks to everyone for your help.
 
Using the TStringGrid set FixedCols to be greater than 0 so you have fixed, or locked as you call it, columns. Place data in the grid as normal and anything in the fixed cols will stay on screen.

 
Thanks sweb for yer help. That hint was helpful enough to get round the problem for the moment.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top