This is a migrated thread and some comments may be shown as answers.

paging buttons are not working

4 Answers 97 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Suprodeep
Top achievements
Rank 1
Suprodeep asked on 23 Aug 2008, 04:49 PM
Hi,

I have put in a Radgrid control and binding it to a list of string values.  As i have set the pager mode to nextPreviousandadvanced so it has got a set of buttons to take the user to the specified page and even to change the paging size.  now i have tried reading almost all your manuals but still unable to find out how to make it work, as when i click on the next page it postbacks to the same page showing the page number as 1 and moreover user is also not able to change the size of the page.  Please tell me how to do it as i have read your manual almost 3-4 times.

Please help with required codes or if there is any specific property then please tell me where it is located exactly as you have a rich set of properties for this control.

4 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 25 Aug 2008, 06:35 AM
Hi Suprodeep,

Can you show us how to reproduce this? I checked our online example and everything worked fine:
http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Programming/Slider/DefaultCS.aspx

Best wishes,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Suprodeep
Top achievements
Rank 1
answered on 25 Aug 2008, 06:55 AM

Imports

System.Data

Imports

System.Data.SqlClient

Partial

Class _Default

Inherits System.Web.UI.Page

Protected

Sub ISISGrid1_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles ISISGrid1.NeedDataSource

Dim con As New SqlConnection(ConfigurationManager.AppSettings("ZimsCore"))

Dim

cmd As New SqlCommand("select TOP 10 organizationName from org.organization", con)

Dim

da As New SqlDataAdapter(cmd)

Dim

ds As New DataSet

da.Fill(ds)

ISISGrid1.DataSource = ds

End

Sub

Protected

Sub ISISGrid1_PageIndexChanged(ByVal source As Object, ByVal e As Telerik.Web.UI.GridPageChangedEventArgs) Handles ISISGrid1.PageIndexChanged

ISISGrid1.Rebind()

End

Sub

Protected

Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

ISISGrid1.Rebind()

End

Sub

Protected

Sub ISISGrid1_ItemEvent(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles ISISGrid1.ItemEvent

End

Sub

Protected

Sub ISISGrid1_PageSizeChanged(ByVal source As Object, ByVal e As Telerik.Web.UI.GridPageSizeChangedEventArgs) Handles ISISGrid1.PageSizeChanged

End

Sub

End

Class

0
Suprodeep
Top achievements
Rank 1
answered on 25 Aug 2008, 06:57 AM
This is still not working..I have checked with your online demo.  But practical implemntation is diff from the demo.  Plz suggest   .
0
Sebastian
Telerik team
answered on 27 Aug 2008, 10:27 AM
Hello Suprodeep,

Test whether removing the Rebind() calls for the grid rrom the PageLoad and PageIndexChanged event handlers addresses the issue you are currently having. These method calls are not need since the grid will be rebound automatically on paging/sorting - review the description section of this online demo for more details:

http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/Programming/NeedDataSource/DefaultCS.aspx

Regards,
Stephen
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Suprodeep
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Suprodeep
Top achievements
Rank 1
Sebastian
Telerik team
Share this question
or