DOC: ListView Sort Only on Text of ListItem
Article ID: 153021
Article Last Modified on 7/14/2004
APPLIES TO
- Microsoft Visual Basic 5.0 Learning Edition
- Microsoft Visual Basic 6.0 Learning Edition
- Microsoft Visual Basic 5.0 Professional Edition
- Microsoft Visual Basic 6.0 Professional Edition
- Microsoft Visual Basic 5.0 Enterprise Edition
- Microsoft Visual Basic 6.0 Enterprise Edition
- Microsoft Visual Basic 4.0 Standard Edition
- Microsoft Visual Basic 4.0 Professional Edition
- Microsoft Visual Basic 4.0 32-Bit Enterprise Edition
This article was previously published under Q153021
SUMMARY
The documentation for the SortOrder Property of a ListView control states
that you can "sort from the beginning of the alphabet (A-Z), the earliest
date, or the lowest number." This is incorrect. All sorting is done only on
the textual representation of the items being sorted. This means, for
example, that the number "11000" will be sorted before the number "2000" if
a sort is done in ascending order. This can also affect the sorting of
dates, depending on the format of the date in the text property of the
ListItem object.
Keywords: kbinfo kbdocfix kbcontrol KB153021