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

Items Load Direction with VirtualQueryableCollectionView

3 Answers 61 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Pavan
Top achievements
Rank 1
Pavan asked on 24 Dec 2013, 02:41 PM
Hi,

I am using the Virtual Queryable Collection View with the telerik Grid Views. When I scroll using the Mouse Wheel and the Scroll Direction is Down it calls the Items Loading event which lets me fetch the next set of view models; However when the scroll direction is UP using the Mouse Wheel I would like to load the set of View Models which are above the current item. This will avoid firing the Items Loading event for every single Item when scrolling UP using the Mouse Wheel.


Please refer the image file attached for more details.

Thanks,
PD.




3 Answers, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 25 Dec 2013, 12:14 PM
Hi,

The ItemsLoading event will be raised as you try to access some item and this item is not yet loaded. 

I have tested the loading of data with LoadSize="20". When I scroll up, then the ItemsLoading event is raised and the VirtualQueryableCollectionItemsLoadingEventArgs show the StartdIndex of loading items and the number of items to be loaded after it. For example, if the StartIndex is 301 and the number of items needed to be loaded is 10, then the items with indexes from 301 to 401 will be loaded.

This is how the virtual collection is designed to work.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
0
Pavan
Top achievements
Rank 1
answered on 30 Dec 2013, 09:48 AM

Hi Didie,

 

I agree with the fact that that's the current design.

 

I'd request for a design change to avoid a performance hit while scrolling up. Please find a detailed explanation of the use case below.

 

I have the following scenario.

  • The data is being fetched from the server when the Items Loading Event is being fired.
  • Assume the LoadSize is 30 and the Visible Items is only 15.
  • Lets assume the user is viewing the items from 301 - 315

Issue:
When the user scrolls one item up (Now index will be at 300), there will be an items loading event fired to get the data from the server 300 - 330 and the user will be viewing 300- 314
Now when the user scrolls one more item up (Index at 299), there will again be an items loading event fired to get the data from the server 299 - 329.
This way for every scroll up the items loading event is being called and a call to the server is being forced. I'd assume that when the user scrolls up to index 300, a call to the server will actually fetch items 270- 300 in the Up ward direction so that the subsequent scroll ups will not force a server call. [Although the viewing index is 300 - 314 This data is already available with VQCV].

Kind Regards,
Pavan.

0
Dimitrina
Telerik team
answered on 30 Dec 2013, 01:45 PM
Hi Pavan,

Thank you for sharing your feedback.

We are aware of this behavior and I have already discussed possible changes with the development team. For the moment, we do not consider such an option though.

Regards,
Didie
Telerik
TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
Sign up for Free application insights >>
Tags
GridView
Asked by
Pavan
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Pavan
Top achievements
Rank 1
Share this question
or