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

[Solved] Yahoo-style scrolling performance

3 Answers 146 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rod
Top achievements
Rank 1
Rod asked on 06 Mar 2008, 06:53 PM

I am evaluating the Prometheus RadGrid and one of my requirements is to be able to load more data as the user scrolls. I have looked at the Yahoo-style scrolling demo and it gives the functionality that I require. However, the performance is unacceptible because the grid sends all rows of data to the client every time more data is requested. For example, say the initial page loads 50 rows. When the user scrolls to the bottom, a request is made for more data and the original 50 rows + 50 news rows are sent to the client. When the user scrolls to the bottom again, another request is made and 100 rows + 50 new rows are sent to the client. And so on.

If the number of rows is large, the preformance quickly degrades because so much data is being sent to the client.

Is there a way to have only the new rows sent to the client when the user scrolls to the bottom? One thought I had was to initiate an AJAX request to retrieve the new rows and insert them into the grid on the client side. But I'm not sure if this is possible.

3 Answers, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 10 Mar 2008, 03:49 PM
Hi Rod,

Indeed with the implementation from the only demo the new records are added to the available set of data each time the end user scrolls to the bottom. If you prefer to load only the items on the current page, consider the alternative virtual scrolling demonstrated with the first grid in the same online demo:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/VirtualScrollPaging/DefaultCS.aspx

Thus only the active page items will be fetched from the source at a given time. I hope this is applicable solution for your case.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Rod
Top achievements
Rank 1
answered on 10 Mar 2008, 04:09 PM
Unfortunately this will not work for me. I need to have the grid fetch ONLY the next page worth of data, and append it to previous pages in the client. The Yahoo-style sample fetches the next page worth of data PLUS all previous pages data (I see this by monitoring the traffic using HttpWatch). This really slows the performance when you scroll near the end of a large dataset.
0
Sebastian
Telerik team
answered on 13 Mar 2008, 11:50 AM
Hi Rod,

Unfortunately the exact functionality you request is not supported by RadGrid. You can either fetch merely the records on the currently active page (grid1 on the demo) or increase the overall PageSize dynamically and refresh the grid (grid2 on the demo). I hope that one of these options is feasible workaround for you.

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
Grid
Asked by
Rod
Top achievements
Rank 1
Answers by
Sebastian
Telerik team
Rod
Top achievements
Rank 1
Share this question
or