求助,关于gridview分页显示的问题,第二页以后不显示数据
代码:Sub bind
Dim cn As New SqlClient.SqlConnection("Data Source=20110623-1356;Initial Catalog=公司资料;Integrated Security=True")
cn.Open()
Dim dset As New DataSet()
Dim dc As SqlClient.SqlDataAdapter
dc = New SqlClient.SqlDataAdapter("select * from 销售记录", cn)
dc.Fill(dset, "销售记录")
GridView1.DataSource = dset.Tables("销售记录")
GridView1.DataBind()
End Sub
Private Sub GridView1_PageIndexChanging(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewPageEventArgs) Handles GridView1.PageIndexChanging
GridView1.PageIndex = e.NewPageIndex
bind
End Sub
请各位老师指教,感激涕零