472,781 Members | 1,183 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,781 software developers and data experts.

Sorting a datagrid with Hyphen / Dash


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:


ie It seems to ignore the '-'.

Whereas, I want:

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.

From: Chris Mayers

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

Jul 21 '05 #1
0 816

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

Similar topics

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...
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.
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...
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...
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),...
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,...
by: Rubin | last post by:
1) I want to show a breaking hyphen in Mozilla How do I do that? "Unicode standard annex #14", <http://www.unicode.org/reports/tr14/>, defines 4 breaking hyphens. <quote> Breaking...
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...
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...
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
by: kcodez | last post by:
As a H5 game development enthusiast, I recently wrote a very interesting little game - Toy Claw ((http://claw.kjeek.com/))。Here I will summarize and share the development experience here, and hope it...
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
by: lllomh | last post by:
How does React native implement an English player?
by: Mushico | last post by:
How to calculate date of retirement from date of birth
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

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.