2009年1月21日 星期三

ASP.NET - 在 DataGrid 排序

要在 asp.net 1.1 中的 DataGrid 裡做排序
可以利用 DataView.Sort 來實現

Dim dv as DataView = New DataView(DataTable)
dv.Sort = "排序的欄位"
Me.DataGrid.DataSource = dv
Me.DataGrid.DataBind()

沒有留言: