G
Guest
I am still stuck trying to resolve the CurrentPageIndex problem. I have 3
pages in my datagrid and when I try to go to the second page, I get the
error. I modified my code to:
Private Sub DataGrid1_PageIndexChanged(ByVal source As Object, ByVal e
As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
DataGrid1.PageIndexChanged
'Change pages on the grid.
Try
DataGrid1.CurrentPageIndex = e.NewPageIndex
DataGrid1.DataBind()
Catch x As Exception
DataGrid1.CurrentPageIndex = 0
DataGrid1.DataBind()
End Try
End Sub
But this does not bring back any records when I click to the second page.
If anyone has a solution, I would really be appreciative
pages in my datagrid and when I try to go to the second page, I get the
error. I modified my code to:
Private Sub DataGrid1_PageIndexChanged(ByVal source As Object, ByVal e
As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
DataGrid1.PageIndexChanged
'Change pages on the grid.
Try
DataGrid1.CurrentPageIndex = e.NewPageIndex
DataGrid1.DataBind()
Catch x As Exception
DataGrid1.CurrentPageIndex = 0
DataGrid1.DataBind()
End Try
End Sub
But this does not bring back any records when I click to the second page.
If anyone has a solution, I would really be appreciative