Is there a way to sort gridview on the client side when ItemsSource is a VirtualQueryableCollectionView<T> ?
(sort only loaded data or when TotalItemCount <= loaded items)
3 Answers, 1 is accepted
0
Dimitrina
Telerik team
answered on 05 Dec 2014, 02:12 PM
Hi,
Actually, the collection will not invoke sorting the data itself - it will just call ItemsLoading event where you should sort and load the data from the server. To achieve the goal you can simply not call the server depending on desired condition or use a separate collection as a client-side storage, load the data in this collection and use it instead the server when all data are already loaded.
Hopefully this helps.
Regards,
Dimitrina
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.
After click sort, application goto ItemsLoading event where VirtualCollection where it has already null items. Your event SortDescryptionsChanged clear virtual items before application use ItemsLoading event.
Now when i want change dynamically grid source (when _loadSize < Query items count use QueryableCollectionView else VirtualQueryableCollectionView) then i found bug in your code (attached image).
0
Dimitrina
Telerik team
answered on 10 Dec 2014, 12:13 PM
Hello,
This is indeed what happens. Have you tried loading client side data as the ItemsLoading event is raised?
As it turns out there is not another approach I can suggest.
Regards,
Dimitrina
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.