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

Binding sort column ?

1 Answer 32 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Samuel
Top achievements
Rank 1
Samuel asked on 03 Dec 2014, 05:18 PM
I'm using MVVM and need for my viewmodel to be aware of which column the gridview is currently sorted by as well as the sort direction.  Are there any elegant ways to do this (preferable by binding) ?  I know I can intercept the sorting events in the code behind but I'd rather not do that if possible.

Thanks,
  Sam.

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 04 Dec 2014, 11:30 AM
Hi Sam,

You can find all the information related to the currently applied sorting in RadGridView through its RadGridView.SortDescriptors collection. In case the bound source collection is a QueryableCollectionView, then you can also use the respective  QueryableCollectionView.SortDescriptors

I hope 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.

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