DataGrid Paging

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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
 
Back
Top