Board index » delphi » TListView Sorting using stData

TListView Sorting using stData

I am using Delphi 3 C/S and want to sort my listview on a selected column
either ascending or descending depending on user selection. There are no
examples in D3. Any help on how to use oncompare would be appreciated.
 

Re:TListView Sorting using stData


If you don't use owner data, then you can sort and use the oncompare. In the
oncompare method that YOU would provide, make sure that it returns a ZERO or
POSITIVE or NEGATIVE number depending on whether the 2 values passed to it
are equal or greater than or less than. Have you even tried to write it yet?
If so, let's see some sample code.

Davie

Quote
Thomas Abel wrote:
> I am using Delphi 3 C/S and want to sort my listview on a selected column
> either ascending or descending depending on user selection. There are no
> examples in D3. Any help on how to use oncompare would be appreciated.

Other Threads