DataGrid Paging

G

Guest

Hi all

I have tried to incorporate paging in datagrid ,it is working fine for th
page except for for the last and first page,follwoing is the code i have used

private void DataGrid_PageIndexChanged(object
sender,DataGridPageChangedEventArgs e)
{
DataGird.CurrentPageIndex=e.NewPageIndex
DataGrid.DataSource=DataSet;
DataGrid.DataBind();
}

1) when i click the first page the "DataGrid_PageIndexChanged" is not firing.
2)After clicking on the last page if i try to navigate to some other page
uneven records are being(irrespective of the page being) displayed.

can anyone please suggest me how to go about this

Thanks
Srujan.N
 
J

jim4u

Srujan,


[when i click the first page the "DataGrid_PageIndexChanged" is not
firing. ] Do you mean that the first page link is clickable, but no
postback occurs? Or do you mean that postback occurs, but the
PageIndexChanged method is not called?

Also, can you post the code in your Page_Load? Only those specific to
the datagrid is needed.

Jim
 

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

Top