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

Load Data during scroll

6 Answers 97 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Oved
Top achievements
Rank 1
Oved asked on 18 Oct 2011, 01:30 AM
How can I load data into GridView during scrolling? I don't want to use paging with RadDataPager.

I use MVVM pattern and I use ObservableCollection<EmployeeDto> as ItemSource 

<

 

 

telerik:RadGridView x:Name="EmployeesGrid"AutoGenerateColumns="False" ItemsSource="{Binding EmployeesCollection}"

 


EmployeeDto()
{
    int Id{get; set;}
    int name {get; set;}
    .
    .
    .
}

The  EmployeesCollection  can be 20,000 records and its take long time to calculate them. So I want to bring then by packages (20-50 records each time). I'd like to do this by the time the user scroll the grid.
It this possible?
Enother option is to load the data on the background. each time 20-50 records. How can I dow that?

6 Answers, 1 is accepted

Sort by
0
Accepted
Vlad
Telerik team
answered on 18 Oct 2011, 07:51 AM
Hello,

 You need our virtual collection. Please check this demo and these blog posts for more info.

Best wishes,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Oved
Top achievements
Rank 1
answered on 19 Oct 2011, 02:52 PM
Thanks,
Can I use the same technics for TreeListView?
0
Vlad
Telerik team
answered on 19 Oct 2011, 03:18 PM
Hi,

 You cannot use this technique with the treelist since this component will need all the data to create special hierarchical collection (needed for hierarchical sorting, filtering, etc.). You can use however RadTreeView or hierarchical RadGridView. 

Kind regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Oved
Top achievements
Rank 1
answered on 19 Oct 2011, 06:53 PM
Another questions on the same issue:
I use VirtualQueryableCollectionView to manage large list of data (exactly as the attachment above)

1. How can I refresh VirtualQueryableCollectionView?
 Lets say, for exemple, that I have 2 buttons abd each one is responsible to dispaly list of employees from different type.
When the page is loading I display default list by using VirtualQueryableCollectionView. But when I clicked on one of the buttons I'd like to change the employee list that was alredy loaded and retrieves another list.

2. How can I cache the data that was alredy download to the client.
When I scrolled up and down through the grid I noticed that calls to the server raise again even for data that alredy have been downloaded. Can I prevent this by caching or by another technic?

3. I dont know the exac number of employees in list. Is there any way that VirtualQueryableCollectionView can handle without this peace of data. (I Use VirtualItemCount but it not good for this situation)
0
Vlad
Telerik team
answered on 21 Oct 2011, 09:27 AM
Hello,

 Straight onto your questions:

1) Generically you can call Refresh() however in this case It will be better to create new virtual collection. 
2) The column will cache automatically loaded items and will not call ItemsLoading.
3) You cannot work without VirtualItemCount.

Kind regards,
Vlad
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

0
Maverick
Top achievements
Rank 1
answered on 16 Oct 2012, 07:46 AM
Hi,

Can i load grid data on scroll without using "VirtualQueryableCollectionView" as i have a prior release of Telerik.Windows.Data and i can not find Virtual Collection view in it.


Please help me its urgent.


Regards,
Maverick
Tags
GridView
Asked by
Oved
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Oved
Top achievements
Rank 1
Maverick
Top achievements
Rank 1
Share this question
or