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

Virtualization of remote data delay in read

2 Answers 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Richard
Top achievements
Rank 2
Iron
Veteran
Iron
Richard asked on 24 May 2018, 02:14 PM

 

I have a grid with a lot of data, when a user grabs the scroll bar and (for example) drags it 1/2 down the grid it makes multiple calls to the DB as that user drags past the paging size. 

Is it possible to only read from the DB when the user stops scrolling so that there is only 1 read from the DB at the point they are looking at and the unnecessary reads that were scrolled past are never made? 

 

Thanks,

Richard

2 Answers, 1 is accepted

Sort by
0
Viktor Tachev
Telerik team
answered on 29 May 2018, 11:06 AM
Hello Richard,

Based on the description I guess that Virtual Scrolling is enabled for the Grid component. In this mode as the users scroll a request will be sent to the server when the scrollbar reaches about one third of the available items. This pre-fetches the items and the result will be seamless scrolling when moving slowly through the items. This is a built-in optimization feature and cannot be switched off. 

In case the users scroll fast through the items a request for the new items will be sent to the server. It is possible for multiple requests to be sent if the scrollbar is moved through multiple virtual pages. 

If this behavior is not suitable for the scenario you are implementing you can consider using regular paging or endless scrolling. The difference with endless scrolling is that items will be requested when the scrollbar reaches the end. Also, have in mind that the new items are appended to the already existing ones. Thus, it may not be suitable for large data sets. 


Regards,
Viktor Tachev
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Richard
Top achievements
Rank 2
Iron
Veteran
Iron
answered on 29 May 2018, 11:48 AM

Thank's Viktor, That was very helpful to read and understand. There is a lot of data (100k - 200k rows) so I'll stick with the Virtual Scrolling. I think that will be best for my situation.

Richard

Tags
Grid
Asked by
Richard
Top achievements
Rank 2
Iron
Veteran
Iron
Answers by
Viktor Tachev
Telerik team
Richard
Top achievements
Rank 2
Iron
Veteran
Iron
Share this question
or