OK, now I can get it to page, but there is no data. Now I know when the
initial grid displays it shows 3 pages. I have cached the data to the cahe
object. Here is the code from my PageIndexChanged event handler:
#Region " Message Grid Page Index Changed Event Handler "
Public Sub PageIndexChanged(ByVal sender As Object, ByVal e As
DataGridPageChangedEventArgs) Handles gridMessages.PageIndexChanged
Try
gridMessages.CurrentPageIndex = e.NewPageIndex
'gridMessages.DataSource = DirectCast(Cache.Get("MessageDataset"),
MessagingServices.dsGetCurrentMessages)
gridMessages.DataBind()
Catch ex As Exception
Session("CurrentErrorMessage") = gridMessages.PageCount
Session("CurrentErrorPage") = "home.aspx"
Server.Transfer("errorform.aspx")
End Try
End Sub
#End Region
"Red" <wr****@redsofttech.com> wrote in message
news:OY**************@TK2MSFTNGP12.phx.gbl...
I have implemented the PageIndexChanged event handler and also cached the
data source to a session object. Everytime I click on the next page I get
a:
Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount.
The page index is 1, the number of pages is 2. Any ideas?