Autor Beitrag
qball
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 47



BeitragVerfasst: Fr 12.03.04 13:38 
Hallo,

ich möchte die rows einer stringgrid nach dem inhalt der 1. spalte alphabetisch sortieren. leider gibts bei grids keine eigenschaft "sorted". in der suchfunktion hier im forum habe ich auch nichts gefunden, das mir weiterhilft. hat jemand von euch einen beispielcode für mich?
Killi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 299

Win*
D6 Prof
BeitragVerfasst: Fr 12.03.04 14:46 
Hm...du könntest von Anfang an deine Variablen/Texte der StringGrid in eine TStringList speichern, diese dann sortieren (hier gibt es diesen Befehl) und über die StringList deine StringGrid füllen.

_________________
----
Life is hard and then you die
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Fr 12.03.04 19:00 
@qball:
Suche in: Delphi-Forum, Delphi-Library STRINGGRID SORTIEREN führt dich z.B. hier hin swissdelphicenter.ch.../showcode.php?id=449

@killi:
wie willst du mit einer Stringlist mehrere Spalten sortieren ?

Mfg frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)
MasterBilke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 38

WIN XP
D3 Prof
BeitragVerfasst: Fr 12.03.04 19:56 
@ keldorn: indem man jede spalte im stringrid durch ein seperator trennt und es dann am edne richtig renliest
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Fr 12.03.04 20:02 
MasterBilke hat folgendes geschrieben:
@ keldorn: indem man jede spalte im stringrid durch ein seperator trennt und es dann am edne richtig renliest

ok, so kompliziert habe ich nicht gedacht . aber das gird selber zu sortieren, wird wohl die bessere Lösung sein

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)