Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Dataview sort

Posted on 2014-02-09
3
Medium Priority
?
453 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 2000 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 45

Expert Comment

by:AndyAinscow
ID: 39845693
0
 

Author Closing Comment

by:runnerjp2005
ID: 39845914
works treat thanks
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

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

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This Micro Tutorial will teach you how to add a cinematic look to any film or video out there. There are very few simple steps that you will follow to do so. This will be demonstrated using Adobe Premiere Pro CS6.
Loops Section Overview
Suggested Courses

926 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