|
-
September 22nd, 1999, 08:37 AM
#1
List view sorting and internal indexes
This post may sound similar to another I posted recently but it is different. I have several list views which I am using the default sort(ascii) and a special group of routines to sort numeric and date fields. The problem with this is that my internal indexes are not being sorted while my list views ui is. Is there a way to resort the index? If it helps, I am using SendMessage and LVM_FINDITEM along with other messages to do the sorting for numbers and dates. Thanks in advance.
Following is my case statement:
Select Case ColumnHeader.Index
Case 3, 5:
'Use default sorting to sort the items in the list
TheList.SortKey = ColumnHeader.Index - 1
TheList.SortOrder = (-1 * TheList.SortOrder) + 1
TheList.Sorted = True
Case 4:
'Use sort routine to sort by date
TheList.Sorted = False
SendMessageLong TheList.hWnd, _
LVM_SORTITEMS, _
TheList.hWnd, _
AddressOf CompareDates
Case 1, 2:
'Use sort routine to sort by value
TheList.Sorted = False
SendMessageLong TheList.hWnd, _
LVM_SORTITEMS, _
TheList.hWnd, _
AddressOf CompareValues
End Select
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
|