Solved

Data GRID SORT ASC

Posted on 2013-02-01
6
223 Views
Last Modified: 2013-02-09
Please find the attached data grid.   I need for this to sort the data "ASC" but not familiar with accomplishing this outside of a Gridview.   Please asssit.
Default.aspx.cs
Default.aspx
0
Comment
Question by:BOEING39
  • 3
  • 3
6 Comments
 
LVL 41

Expert Comment

by:guru_sami
Comment Utility
Can you explain what you exactly mean by "outside of GridView.."?

1: You can do at Sql level using order By clause in your query

2: You can do at html level by using some jquery plugins like datatables.net
0
 

Author Comment

by:BOEING39
Comment Utility
Well, using VWD 2010 I am able to set the data with by sort the data "ASC" order.
0
 
LVL 41

Expert Comment

by:guru_sami
Comment Utility
That's what I thought ...so then the other ways are as mentioned in my last post.
Not sure if that's something you are looking for...
0
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 

Author Comment

by:BOEING39
Comment Utility
Sami I am using SQL server.    Are yu saying adjust the code to ascending there as I would normally do in VWD?
0
 
LVL 41

Accepted Solution

by:
guru_sami earned 500 total points
Comment Utility
Check the orderby link I posted earlier.
In your select query it should be something like...

Select * from fileDet Order By fname ASC

Open in new window

Also you can do some explicit sorting of GridView in code-behind as well if you want e.g setting Sorting properties.

Note: Try to use stored procedures wherever possible instead of inline sql.
0
 

Author Closing Comment

by:BOEING39
Comment Utility
Most accurate response.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

772 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

10 Experts available now in Live!

Get 1:1 Help Now