Solved

Data GRID SORT ASC

Posted on 2013-02-01
6
230 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
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
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!

 

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 500 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

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!

Question has a verified solution.

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

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
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…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

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