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
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 >>
Can I use the same technics for TreeListView?
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 >>
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)
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.
Vlad
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>
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