Solved

Bindingsource Sort

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
Microsoft Reports are based on a report definition, which is an XML file that describes data and layout for the report, with a different extension. You can create a client-side report definition language (*.rdlc) file with Visual Studio, and build g…
This video discusses moving either the default database or any database to a new volume.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now