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

Custom Sorting on RadGridView with MVVM

1 Answer 215 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Nancy
Top achievements
Rank 1
Nancy asked on 26 Jun 2014, 04:03 PM
Hi,
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.

1 Answer, 1 is accepted

Sort by
0
Nick
Telerik team
answered on 27 Jun 2014, 07:42 AM
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: http://demos.telerik.com/silverlight/#GridView/CustomSorting.

Furthermore you can use the internal Filtering of RadGridView by implementing the IComparable interface for your business objects. http://demos.telerik.com/silverlight/#GridView/CustomSorting.

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

Regards,
Nik
Telerik
 
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.
 
Tags
GridView
Asked by
Nancy
Top achievements
Rank 1
Answers by
Nick
Telerik team
Share this question
or