Solved

Dataview sort

Posted on 2014-02-09
3
447 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
[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
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

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…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

733 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