Autor Beitrag
TheNeon
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 408

Windows
VS2010 C#
BeitragVerfasst: Fr 05.11.04 15:08 
Hallo,

ich habe mehrere Werte in einem TListView und möchte diese nun vom Benutzer sortieren lassen, spaltenweise. Also z.B. sollen die Werte der 2. Spalte nach sortiert werden.

Wie geht das ??


Danke,
TheNeon :wave:
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Fr 05.11.04 15:44 
Hallo,

guckst Du in der Delphi-Hilfe unter OnCompare. Da gibt es sogar ein Beispiel dazu. Sollte dies nicht genügen, würde ich die Forumssuche bemühen.

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
delphimike
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 117



BeitragVerfasst: Fr 05.11.04 15:56 
Du mußt eine Routine Oncompare schreiben und dann

item1.subitems.strings[1] mit item2.subitems.strings[1] vergleichen

sorttype muß auf tstext stehen
Die Sortierung wird durch Aufruf von Alphasort ausgelöst
TheNeon Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 408

Windows
VS2010 C#
BeitragVerfasst: Fr 05.11.04 18:16 
ok, danke, werd's mal ausprobieren.

btw: die Forumsuche habe ich bemüht, aber keinen Erfolg gehabt :?