Solved

Bindingsource Sort

Posted on 2012-04-04
1
382 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

696 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