|
-
Jun 5th, 2002, 02:57 PM
#1
-
Jun 11th, 2002, 04:35 PM
#2
New Member
Here's the way I do it, and it works well.
ListView1.SortOrder = lvwAscending
ListView1.Sorted = True
ListView1.SortKey = 0 '1 = sort by column 1, 2 = sort by column 2, etc.
This will sort the data by the SORTKEY value, where SORTKEY is the column number.
You may want to turn off sorting after the list is sorted, though, since it does funny things with sorting turned on. Sort the data then turn it off.
ListView1.Sorted = False
If you want to sort the data by clicking a column header, place the following code in the ListView_ColumnClick Sub routine...
ListView1.SortOrder = lvwAscending
ListView1.Sorted = True
ListView1.SortKey = ColumnHeader.Index - 1
ListView1.Sorted = False 'Turn off sorting when done
-
Jun 11th, 2002, 05:23 PM
#3
thanks
thanks for your your reply I will try it
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|