DOCERR: ListView/TreeView Sort Only on Text of ListItem/NodeLast reviewed: March 20, 1998Article ID: Q153021 |
4.00 | 4.00WINDOWS | WINDOWS NT kbprg kbdocerr The information in this article applies to:
SUMMARYAlthough the documentation states that the ListView and TreeView controls can sort entries based on dates or numbers, in reality 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 thesorting of dates, depending on the format of the date in the text property of the ListItem or Node object.
STATUSMicrosoft has confirmed this to be a documentation error in the products mentioned at the beginning of this article.
MORE INFORMATIONThis sorting functionality is provided by the COMCTL32.DLL file that ships with all 32-bit Windows operating systems. COMCTL32.OCX wraps this DLL to provide Windows 95-style common controls to Visual Basic programmers. If a series of documents are created and sorted in Explorer, they will show the same behavior noted in this article and demonstrated in the Step To Reproduce sample below. When in ascending order, numbers will be sorted before alphabetic characters, and A will be sorted before Z. Special characters such as accents, umlauts, tildes, and carets are sorted immediately after the character preceding them, without the corresponding special character. These rules are reversed when sorting is done in descending order.
Steps To Reproduce
|
Additional reference words: 4.00 vb4win vb432
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |