Custom Sorting on RadGridView with MVVM

2 posts, 0 answers
  1. Nancy
    Nancy avatar
    4 posts
    Member since:
    Jun 2014

    Posted 26 Jun 2014 Link to this post

    I am new to MVVM. I am trying to implement my a custom server side sorting with MVVM. I am able to handle the sorting command, where I asynchronously read data from the Web API. In the call back, I update the list which is bound to the grid's Itemsource. But this is clearing the sort arrow on the column header. Can some one give me a sample with this sort of Custom Sorting implemented and still able to retain the sort arrows on the column header.
  2. Nick
    Nick avatar
    593 posts

    Posted 27 Jun 2014 Link to this post

    Hi Nancy,

    The problem with Custom Sorting is that RadGridView cannot know automatically that the collection has been filtered by a certain column. That is why it does not show the Sort indicator of the Column. Here is an example with custom sorting:

    Furthermore you can use the internal Filtering of RadGridView by implementing the IComparable interface for your business objects.

    Let me know if I can help you further with this. 

    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
Back to Top