Solved

Dataview sort

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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
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.
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

706 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

21 Experts available now in Live!

Get 1:1 Help Now