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

sorting GridView and VirtualQueryableCollectionView<T>

3 Answers 121 Views
GridView
This is a migrated thread and some comments may be shown as answers.
adam
Top achievements
Rank 1
adam asked on 04 Dec 2014, 08:30 PM
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

Sort by
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.

 
0
adam
Top achievements
Rank 1
answered on 08 Dec 2014, 07:51 PM
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.

 
Tags
GridView
Asked by
adam
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
adam
Top achievements
Rank 1
Share this question
or