DataGrid1.SelectedIndex=DataGrid1.SelectedIndex + -1;
DataGrid1.DataBind();
不知道你地前进,后退是什么意思?是页面的切换吗?
注意,完整的代码需要出错控制,当遇到Datasets head 或者 end的时候要控制一下。
其实这种移动依然是靠页面刷新来完成的,需要每次重新Bind();
能不能给我分呢?有关DataGrid问题可以继续问我。。乐意回答:)
DataGrid1.DataBind();
不知道你地前进,后退是什么意思?是页面的切换吗?
注意,完整的代码需要出错控制,当遇到Datasets head 或者 end的时候要控制一下。
其实这种移动依然是靠页面刷新来完成的,需要每次重新Bind();
能不能给我分呢?有关DataGrid问题可以继续问我。。乐意回答:)
If DataGrid1.CurrentPageIndex<DataGrid1.PageCount-1 Then
DataGrid1.CurrentPageIndex=DataGrid1.CurrentPageIndex+1;
DataGrid1.DataBind();
End If或者:
If DataGrid1.CurrentPageIndex>0 Then
DataGrid1.CurrentPageIndex=DataGrid1.CurrentPageIndex-1;
DataGrid1.DataBind();
End If
windows Application中控件 DataGrid 的属性 CurrentCell)