Re: How does Windows Explorer sort file names? Emulate this in table...

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Dmitriy Lapshin [C# / .NET MVP] (x-code_at_no-spam-please.hotpop.com)
Date: 09/15/04


Date: Wed, 15 Sep 2004 16:04:08 +0300

Hi,

A vague guess... you need something like a type inherited from System.String
where the CompareTo method would be overridden to implement the proper
sorting algorithm. Then, you should store object of this customized String
type in the table.

-- 
Sincerely,
Dmitriy Lapshin [C# / .NET MVP]
Bring the power of unit testing to the VS .NET IDE today!
http://www.x-unity.net/teststudio.aspx
"VMI" <vonchi_m@yahoo.com> wrote in message
news:uZGDueomEHA.3608@TK2MSFTNGP09.phx.gbl...
> I have a Windows datagrid whose column values are
> (1,10,100,1000,101,10-1,103,11,1710,2).  When the column's sorted (the
> column's of type String), it'll sort this way
> [1,10,100,1000,101,10-1,103,11,1710,2], which is wrong.  But in Windows
> Explorer, when there are files with these same names , Explorer will sort
> them like this: [1,2,10,10-1,11,100,101,103,1000,1710], which is correct.
>
> How can I emulate this Windows explorer sort in my column?
>
> Thanks.
>
>


Relevant Pages

  • Re: Funny alphabetation in Windows explorer
    ... switching to alpha sort instead of numerical sort would affect the outcome. ... 2009 08 28 Saida and Ali return Arc de Triumph and Tour Effel ... It maybe caused by support for 8dot3 naming convention. ... Name as the appear in Explorer ...
    (microsoft.public.windows.vista.file_management)
  • Re: Weird file name sorting order in folder explorer window
    ... I very often sort files in explorer, ... and it happens to me even in a newly created folder that has ... more recent versions try to sort filenames numerically, ... Microsoft MVP [Windows Shell/User] ...
    (microsoft.public.scripting.vbscript)
  • Re: Copying pictures in a certain order
    ... However, when you are getting a list of files on the CD, with Windows ... For instance, to sort by date, click on the date column. ... you can get Explorer to sort in either ascending or descending order. ... formatted pseudo disk so that the meta-data entries correspond to the ...
    (rec.photo.digital)
  • Re: Copying pictures in a certain order
    ... However, when you are getting a list of files on the CD, with Windows ... For instance, to sort by date, click on the date column. ... you can get Explorer to sort in either ascending or descending order. ... Including renaming MP3 files by their MP3 header data for music ...
    (rec.photo.digital)
  • Re: OPEN A FILE
    ... If you open Windows Explorer, sort the directory listing by Name, then I ... "Roger Govier" wrote: ...
    (microsoft.public.excel.setup)