Autor Beitrag
jjturbo
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 12.08.10 15:53 
Moin Forum,

ich habe eine Tabelle auf dem Bildschirm, in der ein häufig benötigter Wert außerhalb des gerade sichtbaren Bereichs steht. Diese Spalte würde ich gerne weiter vorne anzeigen.
Kann ich in einem TDBGrid einfach zwei Spalten tauschen? Oder irgendetwas "verbiegen"

Danke Euch, Gruß Oliver

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Do 12.08.10 15:56 
Die Spalten stehen unter Columns

_________________
Markus Kinzler.
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Do 12.08.10 15:59 
Ja, aber dann?
So etwa?
DBGrid1.Columns[0].Field := Table1.FieldByName('FeldGanzWeitRechts');

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Gerd Kayser
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 632
Erhaltene Danke: 121

Win 7 32-bit
Delphi 2006/XE
BeitragVerfasst: Do 12.08.10 16:30 
user profile iconjjturbo hat folgendes geschrieben Zum zitierten Posting springen:
ausblenden Delphi-Quelltext
1:
DBGrid1.Columns[0].Field := Table1.FieldByName('FeldGanzWeitRechts');					
In der IDE Rechtsklick auf das DBGrid, dann Spalteneditor auswählen. Dort die bestehenden Spalten löschen und in der gewünschten Reihenfolge hinzufügen.
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Fr 13.08.10 09:30 
Das müsste aber zur Laufzeit passieren.

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...
Andreas Schilling
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 128
Erhaltene Danke: 1

WIN XP, WIN 7
Delphi 5 Ent, Delphi 2007 Pro, XE4
BeitragVerfasst: Fr 13.08.10 09:48 
Der Spalte einfach einen anderen Index geben.
ausblenden Delphi-Quelltext
1:
  DBGrid1.Columns[0].Index := 1;					
jjturbo Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 516

Win2000 prof., WinXP prof.
D4 Stand., D5 Prof, D7 Prof, D2007 Prof.
BeitragVerfasst: Fr 13.08.10 11:34 
Ok, das wars, danke :)

_________________
Windows XP: Für die einen nur ein Betriebssystem - für die anderen der längste Virus der Welt...