-2

The sort order for files and folders whose names contain numerals is incorrect, such as my actually sort result is as following:

Ie4_01
Ie4_128
Ie401sp2
Ie5
Ie501sp2
Ie6

But my expected result is:

Ie4_01
Ie4_128
Ie5
Ie6
Ie401sp2
Ie501sp2

The issue is just as here http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/76b6f4d9-db1e-40a9-8407-13b8bcf6c1c3/ stated.

How can I resolve this issue? Thank you.

1

During a sort, the values are compared character by character.

This is normal behavior. 4 < 5 < 6, so that's how they should be sorted.

A < B < C, but you don't expect AZ to come after BA, because A < B

  • If you sort these folders in Windows explorer, you will find the result is different – Troy Aug 21 '12 at 13:39
0

What you want is a alphanumeric sorting using an IComparer interface

http://www.dotnetperls.com/alphanumeric-sorting

  • Is there any way that don't need programing? Thanks – Troy Aug 21 '12 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.