|
-
Oct 28th, 2012, 09:47 AM
#7
Re: Help sorting listbox in Ascending order(listbox holds only numbers)
A list box does an alpha sort so if you want numbers to be sorted in numeric order they must be left padded to make them all the same length. It doesn't matter it tey are 4 characters or 20 so long as they are all the same. The reason is that an alpha sort starts by looking at the first character 1 comes before 2 so in an alpha sort 1111111111 also comes before 2 as would 199999999999. Alpha sort only looks at the second character if the first character is the same then will do the same thing with the second character and continue until it either finds one that is different or reaches the end.
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
|