Datagrid Paging Issue

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

Paul M

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.
 

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

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top