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

Problem with sorting in grid view

1 Answer 70 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Lakshman
Top achievements
Rank 1
Lakshman asked on 10 Feb 2017, 06:03 AM

I have a grid view with the integer column sorted ascending by default.

At this time, for other event, I am updating this integer column and the values are getting modified in the UI correctly.

But at this case, the sorting is not getting applied correctly.

For example, By default my UI is like below

1

2

3

I have updated the row with value 2 with 5. Then my UI becomes

1

5

3

instead of 

1

3

5

 

Please let me know, how to achieve this.

1 Answer, 1 is accepted

Sort by
0
Stefan Nenchev
Telerik team
answered on 14 Feb 2017, 02:22 PM
Hi Lakshman,

As advised in the Data Operations like filtering, sorting or grouping are not re-evaluated article, the reason for this behavior is that a CollectionChanged event of the bound source collection is not raised. You need to make sure that such event is raised so that the grid reapply the data operations. Please try the approach from the Edit an item outside RadGridView article and update the thread whether it will work for you. 

Regards,
Stefan Nenchev
Telerik by Progress
Want to extend the target reach of your WPF applications, leveraging iOS, Android, and UWP? Try UI for Xamarin, a suite of polished and feature-rich components for the Xamarin framework, which you to write beautiful native mobile apps using a single shared C# codebase.
Tags
GridView
Asked by
Lakshman
Top achievements
Rank 1
Answers by
Stefan Nenchev
Telerik team
Share this question
or