Solved

Dataview sort

Posted on 2014-02-09
3
443 Views
Last Modified: 2014-02-09
Hi all,

I am currently sorting my dataview but     DvTheData.Sort = "Time DESC"

But i need to sort it so it runs up in number format but with adding HT and FT like so...

1,2,3,4,5,6,7,8,9,10,11......43,44,45,HT,46,47....,87,88,89,90,FT

anyone able to shine any light on how this could be done>
0
Comment
Question by:runnerjp2005
3 Comments
 
LVL 40

Accepted Solution

by:
Jacques Bourgeois (James Burger) earned 500 total points
ID: 39845660
Add a String column to your table, and copy the value from the Time column into that new column, with the following rules:

- If the value is less than 10, copy "0" & value
- If the value is HT, copy as 45A
- If the value is FT, copy as 99
- Otherwise, copy the value as is

If you prefer, add a Single column and do the copy with the following rules:

- If the value is numeric, copy it has is
- If the value is HT, copy as 45.5
- If the value is FT, copy as 99

Sort your DataView on that column and the Time will show in the order you want it.
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 39845693
0
 

Author Closing Comment

by:runnerjp2005
ID: 39845914
works treat thanks
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

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…
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 Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…

806 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