Solved

Bindingsource Sort

Posted on 2012-04-04
1
373 Views
Last Modified: 2012-04-10
Hi,

I have many project numbers in my field that I would like to sort in my bindingsource.
The project numbers are like this:
EV-10000-1
EV-10001-1
EV-10002-3
GT-10003-1
GT-10004-1

If I sort this using : ProjetsBindingSource.Sort = "prjNumber DESC"
it will re-order it according to the letters and the numbers, but I would rather it sort it based only on the numbers and not consider the first 2 letters, so I can know exactly what the last number used was.

Is there a way using substring for me to exclude the first 2 characters in the strings when sorting?

Thank you
0
Comment
Question by:FCapo
1 Comment
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 37808182
You would need to add another, may be hidden, column which only has the digits part. Then sort on that column.
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

786 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question