473,609 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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

VMI
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,1 01,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,10 3,1000,1710], which is correct.

How can I emulate this Windows explorer sort in my column?

Thanks.
Nov 16 '05 #1
1 2631
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" <vo******@yahoo .com> wrote in message
news:uZ******** ******@TK2MSFTN GP09.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,1 01,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,10 3,1000,1710], which is correct.

How can I emulate this Windows explorer sort in my column?

Thanks.


Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
3531
by: bayram guzer | last post by:
hi everybody, i have very strange error. i can not see some of the asp pages on my browser. when i look from view source, all the source is there but browser does not show anything, just an empty page. Does anybody have idea about this ?
2
1547
by: Garry Freemyer | last post by:
I wrote a screensaver, via Visual Studio 2003 in C# and I decided a wiser choice for me was to use an xml file to save my configs. Btw: I wonder if this is why every bit of documentation I've found for saving configuration info in an xml file speak of only doing this for web programming in fact, I get the impression that they have been slipped a mickey that made them forget that there are programs out there that are not web based, but I...
1
13535
by: charismatic_evangelist | last post by:
I am trying to write a Windows Service in C# .NET Version 1.1. I followed Microsoft's directions: (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbwlkwalkthroughcreatingwindowsserviceapplication.asp) to the letter and everything worked fine. Then I went into Windows Explorer and changed the name of my files to what I really want....
7
6374
by: TLM | last post by:
I am trying to build a web application that will contain links to files on a users local computer. I am assuming that the files will be in a known location and can display in a browser window. I have my ASP.NET application building links along the lines of file://c:/<path to file>
0
916
by: BK | last post by:
I am using VB.NET in Visual Studion 2003 I am going to have to build an application that uses XML, Serialization and display. I have been asked to implement it using XML. I have done some reading and am trying to put the pieces together before coding but never having worked seriously with XML, I need some direction. I will be generating an XML of the contents of a CDs and DVDs. The hierarchy will contain file attributes in addition...
2
4174
by: =?Utf-8?B?SnJ4dHVzZXIx?= | last post by:
I just started using Windows Live OneCare, I had been using Norton, but was unable to fix the problems I was having. I have yet been unsuccessful with OneCare as well. I keep getting the same warning from OneCare, one is for Adware, the other is for a trojan, I clean both, but almost immediatly, I get the same warning? My Windows Defender is also shut down, not by me as I have no idea how to do this(or to turn it back on), but am still...
1
4583
by: CSharpner | last post by:
Short Question: How do I support Cut/Paste to/from a .NET app and Windows Explorer? Full Text: I'm nearing the completion of a Remote File Management application. It looks and feels a lot like Windows Explorer. The difference is that it communicates with a remote server via web services. The remote web services store and retrieve the file bits to/from a database... along with some other bells and whistles that Explorer doesn't have.
1
1664
by: Visu | last post by:
Hi All! In server explorer when new data connection is added, it shows list of tables, views and procedures. I want to get the list of table names, view names and procedure names in a text file. Is there any method in .NET or how can we get the names in a text files. --
16
11799
by: John | last post by:
I am looking for VBA code that will work with Access 2003 to enable dragging and dropping a file/folder name from Windows XP Explorer into an Access form's text box. This is a common functionality that most Windows programs have, so I'm suprised it's not easier to implement in Access/VBA. Through Google, I found two VB6 examples and one VBA example on the Access Web written by Dev Ashish. The VB6 examples used loops to keep checking...
0
8139
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8579
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8232
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8408
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7024
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6064
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4032
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2540
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1403
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.