Reputation:
In grid view I want to sort the particular column. For that we have to access that column How to do this??
Upvotes: 2
Views: 799
Reputation: 5436
you can follow either one of the foolowing while think of sorting,
1.Client side sorting using javascript or Jquery (recommended if you have lesser number of rows in your gridview)
2.Custom sorting in server side code(I personally recommend you for using large amount of data)
Please follow the link for custom sorting in asp.net
Upvotes: 0
Reputation: 37543
The best method would be to use the built in sorting methods attached to the GridView class itself as described in this article:
http://msdn.microsoft.com/en-us/library/hwf94875.aspx
Might not hurt to accept some answers to previous questions though.
Upvotes: 1
Reputation: 14118
If it's just access to the column you need: myGridview.Columns[0]
, where 0 is the index of your column.
Upvotes: 0