sorting GridView and VirtualQueryableCollectionView<T>

4 posts, 0 answers
  1. adam
    adam avatar
    2 posts
    Member since:
    Sep 2014

    Posted 04 Dec 2014 Link to this post

    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)
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 05 Dec 2014 Link to this post

    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.

     
  3. DevCraft banner
  4. adam
    adam avatar
    2 posts
    Member since:
    Sep 2014

    Posted 08 Dec 2014 Link to this post

    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).


  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 10 Dec 2014 Link to this post

    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.

     
Back to Top