Autor Beitrag
fcg
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Beiträge: 360

WinXP
D3 Prof, D6 Pers
BeitragVerfasst: Fr 01.11.02 16:20 
moin leute,

mein problem ist folgendes. ich habe ein dbgrid und nun möchte ich die einträge in den einzelnen spalten sortieren (so wie im windows explorer, nach datum, name etc),

wie mache ich das. geht das direkt mit table1. sonst was oder muss ich das erst im dbgrid machen. und wenn ja, wie????
:?:
<thanks>

_________________
.: Wer für alles offen ist, kann nicht ganz dicht sein! :.
UGrohne
ontopic starontopic starontopic starontopic starontopic starontopic starofftopic starofftopic star
Veteran
Beiträge: 5502
Erhaltene Danke: 220

Windows 8 , Server 2012
D7 Pro, VS.NET 2012 (C#)
BeitragVerfasst: Fr 01.11.02 16:25 
Im Grid selbst geht das nicht, wenn DU eine SQL-DB verwendest, musst Du einfach das SQL-Statement ändern. An den Schluss einfach ein ORDER BY [Feldname] hinsetzen und ausführen.

Grüße, Uwe
MrSpock
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 262



BeitragVerfasst: Fr 01.11.02 18:28 
Hallo fcg,

... und wenn du keine Query, sondern eine Tabelle hast, bieten sich Indices an. Durch die Auswahl des passenden Indexes, werden die Daten nach diesem sortiert.

_________________
Live long and prosper
MrSpock \\//