Results 1 to 4 of 4

Thread: Listview Sorter: Smarter data sorting required. Please help...

Threaded View

  1. #1

    Thread Starter
    Fanatic Member arsmakman's Avatar
    Join Date
    Dec 2001
    Location
    Leiden, Netherlands.
    Posts
    719

    Listview Sorter: Smarter data sorting required. Please help...

    Hello all,

    I am using a listview to show a bunch of data about some files. I use sorting code provided by Microsoft (http://support.microsoft.com/default...b;en-us;319399) to be able to sort on different columns of the listview. This code uses the IComparer. Sadly, the IComparer doesn't use the smarter 'Windows XP'-way of sorting.

    With XP: 2.jpg will go before 10.jpg (because the number 2 is lower than the number 10)
    With the IComparer: 10.jpg will go before 2.jpg (because the character 1 is 'lower' than character 2)

    The IComparer only sorts textwise, not by value. Is there an easy way to programmatically sort by value? (So that series of 0...9-characters will be seen as values, in stead of normal text.)

    Thanks in advance,
    Alex.
    Last edited by arsmakman; Jun 8th, 2005 at 11:46 AM.
    No matter how fool-proof your program is, there will always be a better fool.

    Was a post helpful to you? Rate it!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width