开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜