Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then bindlist()
If pagemode1.Checked Then
DataGrid1.PagerStyle.Mode = PagerMode.NextPrev
DataGrid1.PagerStyle.PrevPageText = "上一页"
DataGrid1.PagerStyle.PrevPageText = "下一页"
Else
DataGrid1.PagerStyle.Mode = PagerMode.NumericPages
End If
bindlist()
End Sub
这句中加了
If pagemode1.Checked Then
DataGrid1.PagerStyle.Mode = PagerMode.NextPrev
DataGrid1.PagerStyle.PrevPageText = "上一页"
DataGrid1.PagerStyle.PrevPageText = "下一页"
Else
DataGrid1.PagerStyle.Mode = PagerMode.NumericPages
End If
bindlist()
就不能更新了...不知道为什么