Wrox Programmer Forums
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 8th, 2009, 02:53 PM
Registered User
 
Join Date: Sep 2009
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to sort gridfiew

hiiiii all
i want to short grid view according to particular column.how it is possible
i saw some sample in which they use gridviewname_Onsorting event but i saw my grid view doent have OnSorting event it has SortCommand event plzzzzz help me
 
Old September 9th, 2009, 02:39 AM
Authorized User
 
Join Date: Sep 2009
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default

If you are wanting it sorted only once, try sorting the data before you bind it to the grid. Otherwise, if you are using visual studio, you can create the gridview and select the data source within design view and it will create the code to sort any column at runtime for you.
 
Old September 16th, 2009, 06:02 AM
Authorized User
 
Join Date: Apr 2008
Posts: 54
Thanks: 0
Thanked 4 Times in 4 Posts
Default

Quote:
Originally Posted by narayan59y View Post
hiiiii all
i want to short grid view according to particular column.how it is possible
i saw some sample in which they use gridviewname_Onsorting event but i saw my grid view doent have OnSorting event it has SortCommand event plzzzzz help me
Try Assigning sortexpression and enable sorting(GridView Sorting using DataView Asp Net) as explained. Please try and let me know the outcome.
__________________
Pon Saravanan
VbKnowledgebase.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic sort order or sort datatype kapy_kal XSLT 2 September 18th, 2007 02:10 PM
how to sort cross tab.sort based on row total joxa83 Crystal Reports 7 March 2nd, 2006 09:12 AM
Sort @* sheila XSLT 2 July 17th, 2005 04:01 PM
Unable to sort using xsl sort command sly_jimmy_boy XSLT 3 June 17th, 2005 05:15 AM
SORT pallone XSLT 13 February 25th, 2005 11:54 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.