Solved

Bindingsource Sort

Posted on 2012-04-04
1
379 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

Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

Question has a verified solution.

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

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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