开发者

How to sort Grid view on the basis of particular column?

开发者 https://www.devze.com 2022-12-30 11:21 出处:网络
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

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"
0

精彩评论

暂无评论...
验证码 换一张
取 消