QuickStart sample?

L

LL

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..
 

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,995
Messages
2,570,228
Members
46,817
Latest member
AdalbertoT

Latest Threads

Top