Datagrid Paging Issue

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi
I am using a datagrid for paging. I wrote the code as suggested by msdn. It shows me all the pages.The issue here is when i click on other pge pageindex changed is called and again binding happens. but, the page contents are not diaplayed accoding to the page. It shows 2nd page as selected in list but shows the contents of only 1st page

Please guide.
 
Have you implented the PageIndexChange event. I made that mistake at first.

An example :

Private Sub dgJob_PageIndexChanged(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
dgJob.PageIndexChanged
Try

Me.dgJob.CurrentPageIndex = e.NewPageIndex

Call Me.SetDataSource()

Catch ex As Exception

Me.lblError.Text = "clsJobStatusList.dgJob_PageIndexChanged : " &
ex.Message

End Try

End Sub

Cheers...P

Pums said:
Hi,
I am using a datagrid for paging. I wrote the code as suggested by msdn.
It shows me all the pages.The issue here is when i click on other pge
pageindex changed is called and again binding happens. but, the page
contents are not diaplayed accoding to the page. It shows 2nd page as
selected in list but shows the contents of only 1st page.
 
Back
Top