|
 |
aspdotnet_website_programming thread: Paging keeps showing only the first page.
Message #1 by "Soeryanto" <soeryanto@d...> on Sat, 9 Nov 2002 04:00:30
|
|
HI,
I am new to asp.net. I have problem when I tried to implement paging.
It works only by showing the first page. When I click next, it keeps
showing me the first 5 records from the first page. Even though, the
CurrentPageIndex has increased from 0 to 1, from 1 to 2.
Any idea?
Any help is appreciated since I am totally stuck with this problem.
Thanks alot
Anto.
Message #2 by "Pampin Picasso, Juan Pablo (PAZ)" <pampinjp@i...> on Mon, 11 Nov 2002 09:00:15 -0300
|
|
Try this,
Private Sub dg_PageIndexChanged(ByVal source As Object, ByVal e As
System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
dg.PageIndexChanged
dg.CurrentPageIndex = e.NewPageIndex
BindData()
End Sub
You must change the page by code.
dg is the datagrid control.
BindData() is a private sub that do the binding. Here is the code.
Private Sub BindData()
Dim imgs As New Bussines.ImagenesBiz()
dg.DataSource = imgs.Imagenes()
dg.DataBind()
End Sub
-----Mensaje original-----
De: Soeryanto [mailto:soeryanto@d...]
Enviado el: Saturday,November 09,2002 1:01 AM
Para: Website Programming with ASP.NET
Asunto: [aspdotnet_website_programming] Paging keeps showing only the first
page.
HI,
I am new to asp.net. I have problem when I tried to implement paging.
It works only by showing the first page. When I click next, it keeps
showing me the first 5 records from the first page. Even though, the
CurrentPageIndex has increased from 0 to 1, from 1 to 2.
Any idea?
Any help is appreciated since I am totally stuck with this problem.
Thanks alot
Anto.
|
|
 |