igateUrlFormatString="students.aspx?id={0}"
Target="_blank" />
DataGrid与字段排序
AllowSorting="true"表示启动DataGrid排序功能
OnSortCommand="SortPage"当上网者按下抬头的“排序”链接时,将启动SortPage时间程序。
(其实DataGrid并不具有排序功能,我们必须要让具备排序功能的DataView先排序,
然后再将其指定给DateGrid。
之前我们建立DataView对象并且将其与DateGrid连接(尚未具备排序功能):
Grid1.DataSource = CreateDataView( "pubs", "Authors" )
Grid1.DataBind()
程序要修改为:
Dim DV As DataView
DV CreateDataView( "pubs", "Authors" )
指定要排序的字段
DV.Sort=欲排序的字段
将排序过的DataView对象指定给DateGrid
Grid1.DataSource = DV
Grid1.DataBind()
)
Target="_blank" />
DataGrid与字段排序
AllowSorting="true"表示启动DataGrid排序功能
OnSortCommand="SortPage"当上网者按下抬头的“排序”链接时,将启动SortPage时间程序。
(其实DataGrid并不具有排序功能,我们必须要让具备排序功能的DataView先排序,
然后再将其指定给DateGrid。
之前我们建立DataView对象并且将其与DateGrid连接(尚未具备排序功能):
Grid1.DataSource = CreateDataView( "pubs", "Authors" )
Grid1.DataBind()
程序要修改为:
Dim DV As DataView
DV CreateDataView( "pubs", "Authors" )
指定要排序的字段
DV.Sort=欲排序的字段
将排序过的DataView对象指定给DateGrid
Grid1.DataSource = DV
Grid1.DataBind()
)
| 对此文章发表了评论 |

