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

Issue with virtual scroll and page scroll

4 Answers 218 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Martin
Top achievements
Rank 1
Martin asked on 20 Mar 2014, 06:17 PM
When virtual scrolling of a grid is enabled, it interferes with the scrolling of the page when using the mouse wheel.

You can see an example of the issue here: http://jsfiddle.net/RxHps/1/

Is there a way to make virtual scrolling not interfering with the page scroll ?

4 Answers, 1 is accepted

Sort by
0
Alexander Popov
Telerik team
answered on 24 Mar 2014, 11:27 AM
Hi Martin,

This is actually the expected behavior, because in order to achieve proper virtual scrolling the Grid needs to prevent the scroll event propagation. If the event propagates then the whole page will scroll down instead of the Grid making a request for more data. Changing this behavior is currently not supported.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Danny Fritz
Top achievements
Rank 1
answered on 23 Oct 2014, 04:38 PM
I'm running into this issue with virtual scrolling and the whole page scrolling.

I haven't found a solution, but have found ways to alleviate the issue. Bigger pageSize and smaller height will help a lot. I also find that touch on the latest Chrome browser tends to run into the issue a lot, whereas other browsers don't seem to have much of a problem.

I created this test page to show how the whole page scrolls when attempting to scroll up and down in the grid: http://runner.telerik.io/fullscreen/AZOxO/2

If you view this on Chrome with a touch screen, the problem is really prominent. Probably because "flick" scroll can be so much faster than a mousewheel. Not sure why it appears that the other browsers handle it just fine. Maybe it is a difference in how touch events are handled across browsers. It is also possible Chrome is so much smoother of an experience it can scroll faster.


0
Alexander Popov
Telerik team
answered on 27 Oct 2014, 12:57 PM
Hi Danny,

The page is scrolled because the virtual paging scroll event handler is not triggered while the data is loaded. A possible workaround is to manually prevent the scrolling once the Grid's loading animation is present, as shown in this example.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Danny Fritz
Top achievements
Rank 1
answered on 03 Nov 2014, 02:45 PM
[quote]Alexander Popov said:Hi Danny,

The page is scrolled because the virtual paging scroll event handler is not triggered while the data is loaded. A possible workaround is to manually prevent the scrolling once the Grid's loading animation is present, as shown in this example.

Regards,
Alexander Popov
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
[/quote]
That works fantastically. Thanks!
Tags
Grid
Asked by
Martin
Top achievements
Rank 1
Answers by
Alexander Popov
Telerik team
Danny Fritz
Top achievements
Rank 1
Share this question
or