J
jm
I get this error when I click one of the datagrids pages:
Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount.
It is not doing this on the submit as I have this:
Sub submit(Source As Object, e As EventArgs)
if page.IsValid then
MyDataGrid.CurrentPageIndex = 0
BindData()
end if
End Sub
This is the OnPageIndexChanged="NewPage" event handler
Sub NewPage(sender As Object, e As DataGridPageChangedEventArgs)
response.write("before: " & MyDataGrid.currentpageindex & ", ")
MyDataGrid.CurrentPageIndex = e.NewPageIndex
response.write("new: " & e.NewPageIndex & ", current: ")
response.write(MyDataGrid.CurrentPageIndex)
BindData() 'goes to another sub that does the SQL
End Sub
The response.write reveals the page indices are correct.
ANY ideas? Thanks in advance. I've about had it with the DataGrid control!
Invalid CurrentPageIndex value. It must be >= 0 and < the PageCount.
It is not doing this on the submit as I have this:
Sub submit(Source As Object, e As EventArgs)
if page.IsValid then
MyDataGrid.CurrentPageIndex = 0
BindData()
end if
End Sub
This is the OnPageIndexChanged="NewPage" event handler
Sub NewPage(sender As Object, e As DataGridPageChangedEventArgs)
response.write("before: " & MyDataGrid.currentpageindex & ", ")
MyDataGrid.CurrentPageIndex = e.NewPageIndex
response.write("new: " & e.NewPageIndex & ", current: ")
response.write(MyDataGrid.CurrentPageIndex)
BindData() 'goes to another sub that does the SQL
End Sub
The response.write reveals the page indices are correct.
ANY ideas? Thanks in advance. I've about had it with the DataGrid control!