Still having problems with the CurrentPageIndex

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top