?
Solved

Data GRID SORT ASC

Posted on 2013-02-01
6
Medium Priority
?
232 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
[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
  • 3
6 Comments
 
LVL 41

Expert Comment

by:guru_sami
ID: 38845917
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
ID: 38846152
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
ID: 38846156
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
Technology Partners: 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!

 

Author Comment

by:BOEING39
ID: 38848918
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 2000 total points
ID: 38849866
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
ID: 38871430
Most accurate response.
0

Featured Post

Independent Software Vendors: 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

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

765 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