Autor Beitrag
NoEon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 138

win9x, win 2000, win xp, linux 8.0

BeitragVerfasst: Di 31.08.04 16:36 
Hallo NG's

folgendes.
Ich hab eine Paradox Tabelle die ich mir in einem TableGrid anzeigen lassen.

Mein Wunsch wäre jetzt allerdings das mir die SpaltenNamen der Paradox Tabellen in meinem StringGrid angezeigt werden.

Wie geht das????


Gruss
Lars
jasocul
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 6395
Erhaltene Danke: 149

Windows 7 + Windows 10
Sydney Prof + CE
BeitragVerfasst: Di 31.08.04 16:44 
So ganz ist mir nicht klar was Du willst, aber falls Du die Feldnamen auslesen willst, nimmst Du am besten folgendes Verfahren:

grid1.colcount := table1.fieldcount;
for i := 0 to table1.fieldcount - 1 do
grid1.cells[i,0] := table1.fields[i].fieldname;

Dies schnipselchen sollte im Prinzip funktionieren. Damit liest du die Feldnamen aus der Tabelle aus und trägst sie als Überschrift ins Grid ein.
NoEon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 138

win9x, win 2000, win xp, linux 8.0

BeitragVerfasst: Di 31.08.04 16:59 
ja das war doch schon mal nicht schlecht.
Geht das auch senkrecht?!

Gruss
Lars
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Di 31.08.04 17:10 
hallo lars!

Zitat:
die ich mir in einem TableGrid

was bitte ist ein tablegrid?

Zitat:
Geht das auch senkrecht?!

hast du dir das stringgrid schon mal näher angesehen?
was glaubst du, bewirken die beiden koordinaten in der eckigen klammer hinter cells?

mfg, stefan
NoEon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 138

win9x, win 2000, win xp, linux 8.0

BeitragVerfasst: Di 31.08.04 17:24 
ok ok
Zitat:
StringGrid1

noch wieder was gelernt!
Danke!! ich versuch es mal!

gruss
lars
grayfox
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 800

win98, winXP
D4 Standard; D6 Personal
BeitragVerfasst: Di 31.08.04 19:19 
es wäre ja durchaus möglich, dass es in einer 'höheren' delphi-version, als ich habe, ein 'table-grid' gibt.
drum hab ich mich gewundert ;)
siehr dir 'cells' an. dort wirst du die lösung für dein problem finden ...

mfg, stefan