Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 238
  • Last Modified:

Data GRID SORT ASC

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
BOEING39
Asked:
BOEING39
  • 3
  • 3
1 Solution
 
guru_samiCommented:
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
 
BOEING39Author Commented:
Well, using VWD 2010 I am able to set the data with by sort the data "ASC" order.
0
 
guru_samiCommented:
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
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
BOEING39Author Commented:
Sami I am using SQL server.    Are yu saying adjust the code to ascending there as I would normally do in VWD?
0
 
guru_samiCommented:
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
 
BOEING39Author Commented:
Most accurate response.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now