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

Virtual scrolling "paging too early"

1 Answer 50 Views
Grid
This is a migrated thread and some comments may be shown as answers.
-DJ-
Top achievements
Rank 1
-DJ- asked on 28 Oct 2013, 02:40 PM
Hi guys.

I'm trying to implement the most basic version of virtual scrolling. (http://www.telerik.com/help/aspnet-ajax/grid-virtual-scrolling.html)

It works as intended, as long as I'm using a very small pagesize (no larger than 10 basically), or if I'm setting the height of the grid high enough, so that it basically displays all records (of the current page) with very little scrolling.

But that's the only time when it works correctly on my end. As soon as I increase the pagesize of the grid and keep the height of it "normal", it starts paging too early and "skipping" rows.

Let's say I'm binding 200 records to the grid, and using a pagesize of 100, sorting the grid desc by id.

I scroll down, but when I reach approximately the row with id of 140, the grid pages to the second page, and shows me correctly the second page of the grid.

But I can never access the rows between 100 and 140...

Any idea why this is happening?

Regards,
-DJ-


1 Answer, 1 is accepted

Sort by
0
Konstantin Dikov
Telerik team
answered on 31 Oct 2013, 02:22 PM
Hello Daniel,

I have tried to reproduce one of the mentioned issue, but to no avail. Please refer to the attached sample page and see what differs in your project.

About the issue with records after the 100th row, this is due to the following condition in the JavaScript code:
if (currentlyDisplayedRecords < 100) {
    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("LoadMoreRecords");
}

Please note that you will have to change "100" with your current items count in order to retrieve all items with the scrolling.

Hope this helps.

 

Regards,
Konstantin Dikov
Telerik
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
Grid
Asked by
-DJ-
Top achievements
Rank 1
Answers by
Konstantin Dikov
Telerik team
Share this question
or