borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Problem with Netscape Navigator)Next Topic (how to set images in the pager of the datagrid??) New Topic New Poll Post Reply
AndreaVB Forum : ASP.Net : Datagrid Paging Problem?
Poster Message
tri_inn
Level: Regular User
Registered: 26-08-2002
Posts: 395

icon Datagrid Paging Problem?

datagrid has buil in paging facility so automatically tow next and previous buttons comes and whenever we click on Next and previous button then pageindex change event fire and
e.NewPagIndex property automatically increase and decrease in respect of navigation button click and e.NewPagIndex property give us right PagIndex but my problem is that
the e.NewPagIndex property giving right value only first time and next when i am clicking on next button then e.NewPagIndex property giving old value so i am unable to show right data.please help.

15-10-2004 at 06:50 AM
View Profile Send Email to User Show All Posts | Quote Reply
MacD
Level: Big Cheese

Registered: 06-01-2004
Posts: 19
icon Re: Datagrid Paging Problem?

Hi pal,

Try in your code behind something like:

Public Sub Display(ByVal sender As Object, ByVal e As DataGridPageChangedEventArgs)
        dgData.CurrentPageIndex = e.NewPageIndex
        fillDataSet()
    End Sub

Where :

1. fillDataset() is the method  that will be refilling your dataset.
2. Display is the method that you will be calling on your OnPageIndexChanged event

hope this will help you


____________________________
MacD

21-10-2004 at 12:47 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : ASP.Net : Datagrid Paging Problem?
Previous Topic (Problem with Netscape Navigator)Next Topic (how to set images in the pager of the datagrid??) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder