Hi,
I'm testing the QuickStart's datagrid10.aspx. I add paging property to
the grid.
private void MyDataGrid_PageIndexChanged(object source,
System.Web.UI.WebControls.DataGridPageChangedEventArgs e)
{ MyDataGrid.CurrentPageIndex = e.NewPageIndex;
BindGrid();
}
I found that when delte the lastrecord on other page, got this error:
Exception Details: System.Web.HttpException: Invalid CurrentPageIndex value.
It must be >= 0 and < the PageCount.
Source Error:
Line 92:
Line 93: MyDataGrid.DataSource=ds.Tables["Employee"].DefaultView;
Line 94: MyDataGrid.DataBind();
Line 95: }
Line 96:
Source File: c:\project\QS\datagrid10.aspx.cs Line: 94
How to fix it?
Thansk..
Alvin Bruney - 27 Nov 2003 17:10 GMT
There is no real fix for this. Unless I hear differently, I'm saying this is
a known bug. Just catch the exception and reset the currentpageindex = 0.
That works most of the times.

Signature
Regards,
Alvin Bruney
Got Tidbits? Get it here
www.networkip.net/tidbits
> Hi,
>
[quoted text clipped - 25 lines]
>
> Thansk..