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

PageSizeChanged Event Firing Continuously

1 Answer 108 Views
Grid
This is a migrated thread and some comments may be shown as answers.
nick
Top achievements
Rank 1
nick asked on 09 Aug 2010, 02:42 AM
Anybody come across this behavior? I have implemented a RadGrid inside a RadAjaxPanel. I have enabled sorting and paging and everything works fine. I was surprized to find very few examples of how to get the PageSize combobox to work with paging and sorting, even though it is in almost every RadGrdi demo one the Telerik site. Anyway, after a lot of digging, I found an incomplete example which I implemented as follows in my code-behind:

Protected

 

Sub PageSizeChanged(ByVal sender As Object, ByVal e As GridPageSizeChangedEventArgs) Handles _  
                                                                    RadGrid1.PageSizeChanged

 

 

   RadGrid1.DataSource = myDataSource

 

   RadGrid1.PageSize = e.NewPageSize

 

   RadGrid1.DataBind()

 

End

 

Sub

The problem is that this event does not only fire when I change the page size by changing the selection in the page zie combobox in the footer of the grid, but it fires approximately every 3 seconds, even when I am on a different page in my project. It is almost like the page refreshes every few seconds. And it keeps doing it. When I am on my grid page and I change the page size, my grid never actually finishes loading--my RadAjaxLoadingPanel just keeps spinning indefinitely.

 

1 Answer, 1 is accepted

Sort by
0
Accepted
Pavel
Telerik team
answered on 11 Aug 2010, 07:36 AM
Hello Nick,

From the markup you have pasted I am assuming you are using simple data binding, to populate the Grid, is that correct? If this is the case I cannot reproduce such a problem with our example. I noticed that you are calling RadGrid1.PageSize = e.NewPageSize which is not necessary in this case, as you simply need to specify the data source for the Grid as illustrated in the demo. Try removing that line and let us know if you still experience problems.

Regards,
Pavel
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
Grid
Asked by
nick
Top achievements
Rank 1
Answers by
Pavel
Telerik team
Share this question
or