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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

View Grid Field names in rows and field data in columns???

Status
Not open for further replies.

Sam2

Programmer
Mar 12, 2003
2
ZA
Hi

Does anyone know of a way or a component in which I can view a table in a similar way to using a grid, except I need each field name to appear in a new row in the first column and the data for that field in the other columns.
Basically I need to swop the columns and rows of a dbGrid around.

eg.

UserID: 1 2 3
User: AB CD EF
Code: TT SS ZZ

etc...

Can anyone please help?

Thanx in Advance
Sam
 
If you take a look at my post in thread102-418448 you will find some code I've used in the past for populating a TStringGrid. You should be able to adapt the code to do what you want by swapping rows and columns.

Unfortunately I'm about to leave on a week's holiday so if you have any questions I won't be able to help until I get back. (Unfortunate for you, very fortunate for me [smile].) If you have another question, it would be best to start a new thread so someone else here can pick up the ball and run with it.

BTW, I see this is your first post here. Welcome to Tek-Tips!
 
Thanx Zathras

I'll have a look, I found a way to do it with a dev express component called dxInspector but unfortunately it only allows me to view one row at a time.

Have a great holiday
Sam
 
I used a TValueListEditor recently which you could check out from the "Additional" tab of your toolbox. Clive [infinity]
Ex nihilo, nihil fit (Out of nothing, nothing comes)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top