I want to sort Grid View on the basis of paticular column.
Fo开发者_运维问答r example:
alt text http://img30.imageshack.us/img30/5673/tablezz.jpg
Now i want to sort above table in such a way that all Developers should come first.
Thanx
First set the Allowsorting Property of the Gridview to true.
Then set the SortExpression property of the Occupation column to correponding column of your data source.
For example:
yourGridView.Columns[2].SortExpression = "YourDataSourceColumnName"
精彩评论