views:

86

answers:

1

Hi,

I want to sort Grid View on the basis of paticular column.

For example:

alt text

Now i want to sort above table in such a way that all Developers should come first.

Thanx

A: 

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"
24x7Programmer