473,466 Members | 1,360 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Sorting a datagrid with Hyphen / Dash

Hi,

I have a dotNET Windows Forms DataGrid that contains a column'Part Number'

Problem is when I sort the grid on this column (eitherprogramatically or by clicking on the column header), thesequence is somthing like:

10-199
10-299
103-10
103-20
10-399

ie It seems to ignore the '-'.

Whereas, I want:
10-100
10-200
10-300
103-10
103-20

As the characters before the dash represent the part 'type' andthose after it represent the part 'size'

Is there a way of changing the sort parameters so that it does atrue comparison, rather than making its own decisions about howmy data is formatted...? I really don't want to get intocreating my own DataGrid with customised sort routines etc etcetc if I don't have to...

I don't think the source of the data or the code to generate thedatagrid is relevent, but if anyone believes it is, I canprovide further information on these.

Note: I CAN get round the problem by replacing the '-' with a '~'but that is not really a solution.

Any suggestions gratefully received.

Chris.
CJM170967LAT
--------------------------------
From: Chris Mayers

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>fGtKoxs8HU62/esOXeVmgw==</Id>
Jul 21 '05 #1
0 831

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

Similar topics

76
by: Zenobia | last post by:
How do I display character 151 (long hyphen) in XHTML (utf-8) ? Is there another character that will substitute? The W3C validation parser, http://validator.w3.org, tells me that this character...
4
by: Chris Mayers | last post by:
Hi, I'm trying to sort a DataGrid (dotNet Windows Forms). Trouble is, the column I'm trying to sort on contains part numbers of the form xxx-yyy where xxx - Part Type yyy - Part Size.
13
by: Matt | last post by:
I would like to set the "list-style-type" to be a hyphen (-). How can I accomplish this in a style sheet. I tried list-style-type: hyphen; and list-style-type: dash; but neither worked. I also...
22
by: stevenkobes | last post by:
If a word has a hyphen in it, IE will permit a line break at the hyphen, but Firefox/Mozilla won't. Apparently the Firefox behavior is standards-compliant, but it is not what I want. Is there a...
0
by: Chris Mayers via .NET 247 | last post by:
Hi, I have a dotNET Windows Forms DataGrid that contains a column'Part Number' Problem is when I sort the grid on this column (eitherprogramatically or by clicking on the column header),...
4
by: deancarstens | last post by:
Hi, This is a tougher one, but I'm quite sure someone will have a solution for this. Of course, a last minute thing thrown at me by my boss. I have a unique identifier consisting of regions,...
4
by: Rubin | last post by:
1) I want to show a breaking hyphen in Mozilla 1.5.0.4 How do I do that? "Unicode standard annex #14", <http://www.unicode.org/reports/tr14/>, defines 4 breaking hyphens. <quote> Breaking...
6
by: Kc-Mass | last post by:
In a standard Ascii table a dash or hyphen is decimal 45. A period or dot is decimal 46. If I sort a table or recordset of mixed character string ascending in Access, those strings beginning with...
0
by: Andreas Prilop | last post by:
It seems to me that Internet Explorer 7 (as opposed to IE6) displays the non-breaking-hyphen U+2011 or ‑ as some sort of dash rather than a hyphen. See U+2011 #8209 at...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.