473,480 Members | 1,810 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>
Nov 22 '05 #1
0 717

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

Similar topics

76
15036
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...
0
832
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
2755
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.
2
945
by: DelphiBlue | last post by:
I have a Nested Datagrid that is using a data relations to tie the parent child datagrids together. All is working well with the display but I am having some issues trying to sort the child...
13
49836
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
7973
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...
4
1791
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
4533
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
7778
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
2305
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...
0
6908
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
7088
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...
1
6741
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...
0
6956
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...
0
4485
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
2997
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
2986
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1300
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 ...
0
183
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...

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.